-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactivity_home_screen.xml
225 lines (185 loc) · 8.93 KB
/
activity_home_screen.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
<?xml version="1.0" encoding="utf-8"?>
<!--Adding navigation drawer widget-->
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:fitsSystemWindows="true"
tools:context="com.ikai.unitshop.HomeScreenActivity"
tools:openDrawer="start">
<!-- Add custom toolbar for action -->
<RelativeLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--Main Screen content goes here-->
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--Toolbar for main screen goes here-->
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
app:theme="@style/HomeScreenTheme"
app:titleTextColor="@color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="15dp"
android:layout_marginEnd="15dp"
android:orientation="horizontal">
<TextView
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold" />
<Switch
android:checked="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true" />
</LinearLayout>
</android.support.v7.widget.Toolbar>
<LinearLayout
android:background="@color/main_screen_background_color"
android:orientation="vertical"
android:id="@+id/main_area_container"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
<!--Adding bottom navigation bar-->
<android.support.v7.widget.CardView
android:layout_alignParentBottom="true"
android:id="@+id/bottom_nav_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_nav_height"
card_view:cardBackgroundColor="#fff"
app:cardCornerRadius="0dp">
<!--Icons container-->
<LinearLayout
android:gravity="center_vertical"
android:id="@+id/icons_container"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--Home icon container-->
<LinearLayout
android:clickable="true"
android:gravity="center"
android:orientation="horizontal"
android:id="@+id/home_icon_container"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<!--Home icon-->
<ImageView
android:id="@+id/home_icon"
android:layout_width="@dimen/bottom_nav_icon_size"
android:layout_height="@dimen/bottom_nav_icon_size"
android:src="@drawable/ic_hm_active" />
</LinearLayout>
<!--Shop icon container-->
<LinearLayout
android:clickable="true"
android:gravity="center"
android:orientation="horizontal"
android:id="@+id/shop_icon_container"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<!--Shop icon-->
<ImageView
android:src="@drawable/ic_store_n_active"
android:id="@+id/add_icon"
android:layout_width="@dimen/bottom_nav_icon_size"
android:layout_height="@dimen/bottom_nav_icon_size" />
</LinearLayout>
<!--Emergency help container-->
<LinearLayout
android:clickable="true"
android:gravity="center"
android:orientation="horizontal"
android:id="@+id/emergency_help_container"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<!--Emergency help icon-->
<ImageView
android:src="@drawable/ic_bell_n_active"
android:id="@+id/emergency_help_icon"
android:layout_width="@dimen/bottom_nav_icon_size"
android:layout_height="@dimen/bottom_nav_icon_size" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
<!-- The navigation drawer field goes here. And drawer start from left -->
<!-- because gravity is set to 'start' -->
<android.support.design.widget.NavigationView
android:id="@+id/nav_drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@color/white">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--Header section i.e. profile view goes here-->
<LinearLayout
android:background="@color/colorPrimary"
android:gravity="bottom"
android:orientation="vertical"
android:id="@+id/header_profile_background"
android:layout_width="match_parent"
android:layout_height="192dp">
<!--Profile picture and progress bar goes here-->
<FrameLayout
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Profile picture goes here-->
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/profile_photo"
android:layout_gravity="center_horizontal"
app:civ_border_width="3dp"
app:civ_border_color="@color/white"
android:clickable="true"
android:src="@drawable/app_background"
android:layout_width="@dimen/drawer_profile_photo_size"
android:layout_height="@dimen/drawer_profile_photo_size" />
<!--Progress bar goes here-->
<ProgressBar
android:id="@+id/progress_bar_profile_photo"
android:layout_gravity="center"
android:layout_width="36dp"
android:layout_height="36dp" />
</FrameLayout>
<!--User name for header section goes here-->
<TextView
android:layout_marginTop="5dp"
android:layout_marginBottom="10dp"
android:gravity="center_horizontal"
android:textStyle="bold"
android:textSize="18sp"
android:id="@+id/profile_name"
android:text="Fetching..."
android:textColor="@color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/nav_drawer_items_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>