-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactivity_product_details.xml
317 lines (274 loc) · 13 KB
/
activity_product_details.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.ikai.unitshop.ProductDetailsActivity">
<!--Did you mean and normal back layout for search bar goes here-->
<LinearLayout
android:paddingTop="68dp"
android:background="@color/colorPrimary"
android:orientation="vertical"
android:id="@+id/did_you_mean_and_back_area"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--Did you mean card goes here-->
<android.support.v7.widget.CardView
android:visibility="gone"
android:id="@+id/did_you_mean_card"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_margin="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--Did you mean text goes here-->
<TextView
android:textSize="16sp"
android:text="Did you mean: "
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<!--Did you mean prediction text goes here-->
<TextView
android:clickable="true"
android:text="prediction"
android:textColor="@color/blue"
android:textStyle="bold"
android:textSize="16sp"
android:id="@+id/prediction_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
<!--Card view for both search box and suggestion box-->
<android.support.v7.widget.CardView
app:cardBackgroundColor="#ffffff"
app:cardElevation="3dp"
android:layout_width="match_parent"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--Search box goes here-->
<RelativeLayout
android:id="@+id/search_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--Input text field goes here-->
<AutoCompleteTextView
android:layout_centerVertical="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/search_box"
android:hint="Search your Products"
android:layout_toLeftOf="@+id/mic_icon"
android:layout_toStartOf="@+id/mic_icon"
android:layout_toRightOf="@+id/unit_flat_logo"
android:layout_toEndOf="@+id/unit_flat_logo"
android:inputType="text"
android:completionThreshold="1"
android:imeOptions="actionSearch"
android:layout_centerInParent="true"
android:dropDownAnchor="@+id/search_layout"
android:clickable="true"
android:background="#ffffff"/>
<!--UNiT logo goes here-->
<ImageView
android:layout_centerVertical="true"
android:src="@drawable/logo"
android:clickable="false"
android:id="@+id/unit_flat_logo"
android:layout_width="48dp"
android:layout_height="48dp" />
<!--Mic icon goes here-->
<ImageButton
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:background="@drawable/ic_mic_active"
android:id="@+id/mic_icon"
android:clickable="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
<!--Separator view between search box and suggestion box-->
<View
android:visibility="gone"
android:layout_below="@+id/search_layout"
android:id="@+id/separator"
android:background="@color/grey"
android:layout_width="match_parent"
android:layout_height="1dp"/>
<!--Suggestion box goes here-->
<android.support.v7.widget.RecyclerView
android:id="@+id/suggestion_recycler_view"
android:layout_below="@+id/separator"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>
</android.support.v7.widget.CardView>
<!--Layout to show products and floating add button-->
<FrameLayout
android:id="@+id/frame_layout"
android:layout_below="@+id/did_you_mean_and_back_area"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--Relative layout for product cards with progress bar will goes here-->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--Recycler view for product cards will goes here-->
<android.support.v7.widget.RecyclerView
android:id="@+id/product_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<!--Progress bar-->
<ProgressBar
android:visibility="gone"
android:layout_marginTop="10dp"
android:layout_centerHorizontal="true"
android:id="@+id/loading_bar"
android:layout_below="@+id/product_details"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<!--Text to show that there is no more product to load-->
<TextView
android:visibility="gone"
android:layout_marginTop="10dp"
android:id="@+id/no_more_product_text"
android:layout_below="@+id/loading_bar"
android:text="No more product to load"
android:layout_centerHorizontal="true"
android:textColor="@color/colorAccent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
<!--Layout to show that you have not added any product yet-->
<LinearLayout
android:visibility="gone"
android:id="@+id/product_not_added_layout"
android:orientation="vertical"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--Image to show if there is no product in the shop-->
<ImageView
android:src="@drawable/flat_unit_logo"
android:layout_width="100dp"
android:layout_height="100dp" />
<!--Text to show that you have not added any product yet-->
<TextView
android:layout_marginLeft="15dp"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:layout_marginRight="15dp"
android:gravity="center"
android:textSize="18sp"
android:textStyle="bold"
android:text="You have not added any product yet. Please add some product to see products here."
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<!--Recycler view for resulting product cards will goes here-->
<android.support.v7.widget.RecyclerView
android:visibility="gone"
android:id="@+id/resulting_product_detail"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!--Loading view goes here to show that products are being loaded-->
<!--<LinearLayout-->
<!--android:orientation="vertical"-->
<!--android:gravity="center"-->
<!--android:id="@+id/loading_layout"-->
<!--android:background="@color/loading_background"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent">-->
<!--<!–Loading icon goes here–>-->
<!--<ImageView-->
<!--android:src="@drawable/logo"-->
<!--android:layout_width="70dp"-->
<!--android:layout_height="70dp" />-->
<!--<!–Horizontal progress bar goes here–>-->
<!--<ProgressBar-->
<!--android:id="@+id/loading_progress_bar_horizontal"-->
<!--android:layout_width="60dp"-->
<!--android:layout_height="wrap_content"-->
<!--style="@style/Widget.AppCompat.ProgressBar.Horizontal"-->
<!--android:indeterminate="true" />-->
<!--</LinearLayout>-->
<!--Floating button to add products that will open options to add products-->
<android.support.design.widget.FloatingActionButton
android:layout_marginRight="15dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="15dp"
android:id="@+id/fab_add_product"
android:clickable="true"
android:layout_gravity="bottom|end"
android:src="@drawable/ic_add_white_24dp"
android:layout_width="56dp"
android:layout_height="56dp"
app:elevation="10dp" />
<!--Floating button to add products by searching-->
<android.support.design.widget.FloatingActionButton
android:visibility="invisible"
android:layout_marginRight="15dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="90dp"
android:id="@+id/fab_search"
android:layout_gravity="bottom|end"
android:src="@drawable/ic_search_24dp"
android:layout_width="56dp"
android:layout_height="56dp"
app:elevation="10dp" />
<!--Floating button to upload products-->
<android.support.design.widget.FloatingActionButton
android:visibility="invisible"
android:layout_marginRight="90dp"
android:layout_marginEnd="90dp"
android:layout_marginBottom="15dp"
android:id="@+id/fab_upload"
android:layout_gravity="bottom|end"
android:src="@drawable/ic_cloud_upload_24dp"
android:layout_width="56dp"
android:layout_height="56dp"
app:elevation="10dp" />
<!--Layout for description box-->
<!--<android.support.v7.widget.CardView-->
<!--app:cardCornerRadius="15dp"-->
<!--app:cardElevation="2dp"-->
<!--android:layout_gravity="start|bottom"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_marginBottom="100dp"-->
<!--android:layout_height="wrap_content">-->
<!--<EditText-->
<!--android:id="@+id/description_box"-->
<!--android:background="@drawable/description_box"-->
<!--android:padding="5dp"-->
<!--android:gravity="start"-->
<!--android:hint="Edit text view"-->
<!--android:scrollbarTrackVertical="@color/description_box_border"-->
<!--android:scrollbars="vertical"-->
<!--android:scrollbarSize="4dp"-->
<!--android:minLines="4"-->
<!--android:maxLines="4"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content" />-->
<!--</android.support.v7.widget.CardView>-->
</FrameLayout>
</RelativeLayout>