Skip to content

Commit ba96e39

Browse files
Updated UI
1 parent 079199c commit ba96e39

File tree

7 files changed

+68
-48
lines changed

7 files changed

+68
-48
lines changed

.idea/misc.xml

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/com/github/meafs/recover/activites/ChwHubActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ protected void onCreate(Bundle savedInstanceState) {
4949
item.add(new NotificationModel("2-June-2022","Recent Cholera surge in your region, tap to know more!","#AA80deea"));
5050
item.add(new NotificationModel( "19-April-2022","Report to you supervisor to collect new supplies!","#AA80deea"));
5151
item.add(new NotificationModel("30-March-2022", "Polio Vaccination campaign ends on January, 2023","#AA80deea"));
52+
item.add(new NotificationModel("19-March-2022", "Covid Vaccination campaign ends this week","#AA80deea"));
53+
item.add(new NotificationModel("10-March-2022", "Cholera campaign ended successfully","#AA80deea"));
5254

5355
staticRvAdapter = new NotificationAdapter(item);
5456
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));

app/src/main/java/com/github/meafs/recover/adapters/NotificationAdapter.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ public void onBindViewHolder(@NonNull NotificationViewHolder holder, int positio
4444
row_index = position;
4545
notifyDataSetChanged();
4646
});
47-
48-
holder.linearLayout.setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(currentItem.getColorResource())));
4947
}
5048

5149
@Override
83.6 KB
Loading

app/src/main/res/layout/activity_chw_hub.xml

Lines changed: 55 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,43 @@
2929
android:textFontWeight="600"
3030
android:textSize="22sp" />
3131
</com.google.android.material.appbar.MaterialToolbar>
32-
<LinearLayout
32+
33+
<RelativeLayout
3334
android:layout_width="match_parent"
3435
android:layout_height="match_parent"
35-
android:orientation="vertical"
3636
android:layout_below="@+id/toolbar_hub"
3737
android:gravity="center_horizontal"
38+
android:orientation="vertical"
3839
android:weightSum="2">
40+
3941
<RelativeLayout
4042
android:id="@+id/dashbottom_notif"
4143
android:layout_width="match_parent"
4244
android:layout_height="wrap_content"
43-
android:orientation="vertical"
44-
android:layout_weight=".9"
45-
>
45+
android:layout_alignParentTop="true"
46+
android:layout_above="@id/ll_sos"
47+
android:orientation="vertical">
4648

4749
<TextView
4850
android:id="@+id/notif_title"
4951
android:layout_width="match_parent"
5052
android:layout_height="wrap_content"
5153
android:background="@color/lighterSecondaryColor"
52-
android:text="NOTIFICATIONS"
53-
android:textAlignment="center"
5454
android:fontFamily="@font/nunito"
55+
android:padding="10dp"
56+
android:text="Notifications"
57+
android:textAlignment="center"
5558
android:textColor="@color/white"
56-
android:textSize="24dp"
57-
/>
59+
android:textSize="18sp" />
5860

5961
<ScrollView
60-
android:layout_below="@+id/notif_title"
6162
android:id="@+id/notif_list"
6263
android:layout_width="match_parent"
63-
android:layout_height="match_parent">
64+
android:layout_height="match_parent"
65+
android:layout_below="@+id/notif_title"
66+
android:background="@drawable/gradient_1"
67+
android:clipToPadding="false"
68+
android:paddingVertical="12dp">
6469

6570
<LinearLayout
6671
android:layout_width="match_parent"
@@ -77,27 +82,29 @@
7782
<androidx.recyclerview.widget.RecyclerView
7883
android:id="@+id/notif_rv_layout"
7984
android:layout_width="match_parent"
80-
android:layout_height="wrap_content"
85+
android:layout_height="match_parent"
8186
android:layout_marginStart="10dp"
8287
android:layout_marginEnd="10dp"
83-
android:paddingBottom="64dp"
8488
app:layout_constraintVertical_bias="0" />
8589
</LinearLayout>
8690
</ScrollView>
8791

8892
</RelativeLayout>
93+
8994
<LinearLayout
90-
android:layout_below="@id/notif_list"
95+
android:id="@+id/ll_sos"
9196
android:layout_width="match_parent"
92-
android:layout_height="match_parent"
93-
android:layout_marginTop="20dp"
94-
>
97+
android:layout_height="wrap_content"
98+
android:layout_alignParentBottom="true"
99+
android:layout_gravity="bottom"
100+
android:gravity="bottom">
101+
95102
<RelativeLayout
96103
android:id="@+id/notif_bottom"
97104
android:layout_width="match_parent"
98105
android:layout_height="wrap_content"
99-
android:orientation="vertical"
100-
>
106+
android:layout_marginTop="18dp"
107+
android:orientation="vertical">
101108

102109
<LinearLayout
103110
android:id="@+id/hub_buttons"
@@ -106,39 +113,48 @@
106113
android:gravity="center_horizontal"
107114
android:orientation="vertical">
108115

109-
<Button
110-
android:id="@+id/generate_report"
111-
android:layout_width="200dp"
112-
android:layout_height="wrap_content"
113-
android:backgroundTint="@color/lightSecondaryColor"
114-
android:padding="10dp"
115-
android:text="Monthly Report"
116-
android:textColor="#455A64" />
117-
118-
<Button
119-
android:id="@+id/set_emergency_contacts"
120-
android:layout_width="200dp"
116+
<LinearLayout
117+
android:layout_width="match_parent"
121118
android:layout_height="wrap_content"
122-
android:backgroundTint="@color/lightSecondaryColor"
123-
android:padding="10dp"
124-
android:text="Set Emergency Contact"
125-
android:textColor="#455A64" />
119+
android:layout_gravity="center"
120+
android:gravity="center_horizontal"
121+
android:orientation="horizontal">
122+
123+
<Button
124+
android:id="@+id/generate_report"
125+
android:layout_width="148dp"
126+
android:layout_height="match_parent"
127+
android:layout_marginEnd="20dp"
128+
android:backgroundTint="@color/lightSecondaryColor"
129+
android:padding="10dp"
130+
android:text="Monthly Report"
131+
android:textColor="@color/white" />
132+
133+
<Button
134+
android:id="@+id/set_emergency_contacts"
135+
android:layout_width="148dp"
136+
android:layout_height="match_parent"
137+
android:layout_marginStart="20dp"
138+
android:backgroundTint="@color/lightSecondaryColor"
139+
android:padding="10dp"
140+
android:text="Set Emergency Contact"
141+
android:textColor="@color/white" />
142+
</LinearLayout>
126143

127144
<com.google.android.material.button.MaterialButton
128145
android:id="@+id/generate_alert"
129146
style="@style/Widget.MaterialComponents.ExtendedFloatingActionButton"
130-
android:layout_width="100dp"
131-
android:layout_height="100dp"
147+
android:layout_width="72dp"
148+
android:layout_height="72dp"
132149
android:layout_margin="30dp"
133150
android:backgroundTint="#F44336"
134151
android:text="SOS"
135152
android:textColor="@color/white"
136153
app:cornerRadius="50dp" />
137-
138154
</LinearLayout>
139155
</RelativeLayout>
140156
</LinearLayout>
141157

142-
</LinearLayout>
158+
</RelativeLayout>
143159

144160
</RelativeLayout>

app/src/main/res/layout/fragment_user.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@
156156
android:layout_height="120dp"
157157
android:layout_marginHorizontal="20dp"
158158
android:layout_marginTop="20dp"
159-
android:background="@drawable/circle"
160-
android:backgroundTint="#8AD68D"
159+
android:background="@drawable/chw_home"
161160
>
162161
<LinearLayout
163162
android:layout_width="wrap_content"

app/src/main/res/layout/notification_item.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
<LinearLayout
1414
android:layout_width="match_parent"
1515
android:layout_height="wrap_content"
16-
android:orientation="vertical">
16+
android:orientation="vertical"
17+
android:background="@drawable/gradient_1_rounded"
18+
android:backgroundTint="@color/white"
19+
>
1720
<TextView
1821
android:id="@+id/notif_text"
1922
android:layout_width="wrap_content"
@@ -22,10 +25,11 @@
2225
android:layout_marginLeft="10dp"
2326
android:layout_marginTop="5dp"
2427
android:fontFamily="@font/nunito"
25-
android:padding="5dp"
28+
android:paddingTop="10dp"
29+
android:paddingHorizontal="5dp"
2630
android:text="There's a sudden Cholera surge in your region. Tap here to know how you can prepare for it!!"
2731
android:textColor="#000000"
28-
android:textSize="20sp" />
32+
android:textSize="18sp" />
2933
<TextView
3034
android:id="@+id/notif_date"
3135
android:layout_width="wrap_content"

0 commit comments

Comments
 (0)