diff options
author | Kasun <k-a-s-u-n@tuta.io> | 2019-04-21 23:46:45 +0530 |
---|---|---|
committer | Kasun <k-a-s-u-n@tuta.io> | 2019-04-21 23:46:45 +0530 |
commit | 0ac930036ae31e9b1ef060676d5e9240580e1b69 (patch) | |
tree | 7e95ef61c88176e98e75e160d438a00321a80369 | |
parent | fe500fad729f5e2f39defeb0b2a128f21a2f59df (diff) |
update notification settings design
change the design of the category labels in notification settings
fragment to match the settings fragment
-rw-r--r-- | app/src/main/res/layout/fragment_settings_notifications.xml | 175 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 5 |
2 files changed, 154 insertions, 26 deletions
diff --git a/app/src/main/res/layout/fragment_settings_notifications.xml b/app/src/main/res/layout/fragment_settings_notifications.xml index b9693f1aa..299ae4679 100644 --- a/app/src/main/res/layout/fragment_settings_notifications.xml +++ b/app/src/main/res/layout/fragment_settings_notifications.xml @@ -60,11 +60,41 @@ android:layout_height="wrap_content" android:orientation="vertical"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_margin="10dp" + android:layout_weight="1" + android:background="?colorAccent" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + android:text="@string/settings_category_notif_customize" + android:textColor="?colorAccent" + android:textSize="16sp" /> + + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_margin="10dp" + android:layout_weight="1" + android:background="?colorAccent" /> + </LinearLayout> + <Button android:id="@+id/set_notif_sound" android:gravity="center" style="@style/Base.Widget.AppCompat.Button.Colored" android:tint="@android:color/white" + android:layout_marginTop="@dimen/settings_checkbox_margin" + android:layout_marginBottom="@dimen/settings_checkbox_margin" android:text="@string/set_notif_sound" android:layout_width="wrap_content" android:layout_height="wrap_content"/> @@ -72,6 +102,8 @@ <LinearLayout android:layout_width="match_parent" android:id="@+id/channels_container" + android:layout_marginTop="@dimen/settings_checkbox_margin" + android:layout_marginBottom="@dimen/settings_checkbox_margin" android:layout_height="wrap_content" android:orientation="vertical"> <LinearLayout @@ -156,68 +188,141 @@ </LinearLayout> <!-- NOTIFICATIONS SETTINGS --> - <TextView - android:text="@string/settings_title_notifications" - style="?attr/shapeBorder" - android:paddingBottom="10dp" - android:layout_marginBottom="10dp" + <LinearLayout android:layout_width="match_parent" - android:layout_height="wrap_content" /> + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_margin="10dp" + android:layout_weight="1" + android:background="?colorAccent" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + android:text="@string/settings_category_notif_categories" + android:textColor="?colorAccent" + android:textSize="16sp" /> + + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_margin="10dp" + android:layout_weight="1" + android:background="?colorAccent" /> + </LinearLayout> <!-- Toots per page --> <CheckBox android:id="@+id/set_notif_follow" android:layout_width="wrap_content" + android:layout_marginTop="@dimen/settings_checkbox_margin" + android:layout_marginBottom="@dimen/settings_checkbox_margin" android:text="@string/set_notif_follow" android:layout_height="wrap_content" /> <CheckBox android:id="@+id/set_notif_follow_add" android:layout_width="wrap_content" + android:layout_marginTop="@dimen/settings_checkbox_margin" + android:layout_marginBottom="@dimen/settings_checkbox_margin" android:text="@string/set_notif_follow_add" android:layout_height="wrap_content" /> <CheckBox android:id="@+id/set_notif_follow_ask" android:layout_width="wrap_content" + android:layout_marginTop="@dimen/settings_checkbox_margin" + android:layout_marginBottom="@dimen/settings_checkbox_margin" android:text="@string/set_notif_follow_ask" android:layout_height="wrap_content" /> <CheckBox android:id="@+id/set_notif_follow_mention" android:layout_width="wrap_content" + android:layout_marginTop="@dimen/settings_checkbox_margin" + android:layout_marginBottom="@dimen/settings_checkbox_margin" android:text="@string/set_notif_follow_mention" android:layout_height="wrap_content" /> <CheckBox android:id="@+id/set_notif_follow_share" android:layout_width="wrap_content" + android:layout_marginTop="@dimen/settings_checkbox_margin" + android:layout_marginBottom="@dimen/settings_checkbox_margin" android:text="@string/set_notif_follow_share" android:layout_height="wrap_content" /> <!-- END NOTIFICATIONS SETTINGS --> <!-- NOTIFICATION CONTENT NEW --> - <TextView - android:text="@string/set_title_news" - style="?attr/shapeBorder" - android:paddingBottom="10dp" - android:layout_marginBottom="10dp" + <LinearLayout android:layout_width="match_parent" - android:layout_height="wrap_content" /> + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_margin="10dp" + android:layout_weight="1" + android:background="?colorAccent" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + android:text="@string/settings_category_notif_news" + android:textColor="?colorAccent" + android:textSize="16sp" /> + + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_margin="10dp" + android:layout_weight="1" + android:background="?colorAccent" /> + </LinearLayout> <!-- New hometimeline content --> <CheckBox android:id="@+id/set_notif_hometimeline" android:layout_width="wrap_content" + android:layout_marginTop="@dimen/settings_checkbox_margin" + android:layout_marginBottom="@dimen/settings_checkbox_margin" android:text="@string/set_notification_news" android:layout_height="wrap_content" /> - <TextView - android:text="@string/settings_title_hour" - style="?attr/shapeBorder" - android:paddingBottom="10dp" - android:paddingTop="10dp" - android:layout_marginBottom="10dp" + <LinearLayout android:layout_width="match_parent" - android:layout_height="wrap_content" /> + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_margin="10dp" + android:layout_weight="1" + android:background="?colorAccent" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + android:text="@string/settings_category_notif_time_slot" + android:textColor="?colorAccent" + android:textSize="16sp" /> + + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_margin="10dp" + android:layout_weight="1" + android:background="?colorAccent" /> + </LinearLayout> <CheckBox android:id="@+id/set_enable_time_slot" android:layout_width="wrap_content" android:text="@string/set_enable_time_slot" + android:layout_marginTop="@dimen/settings_checkbox_margin" + android:layout_marginBottom="@dimen/settings_checkbox_margin" android:layout_height="wrap_content" /> <LinearLayout style="?attr/shapeBorder" @@ -254,15 +359,33 @@ android:entries="@array/action_notification"/> </LinearLayout> <!-- MORE OPTIONS SETTINGS --> - <TextView - android:text="@string/settings_title_more_options" - style="?attr/shapeBorder" - android:paddingBottom="10dp" - android:paddingTop="10dp" - android:layout_marginBottom="10dp" + <LinearLayout android:layout_width="match_parent" - android:layout_height="wrap_content" /> + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_margin="10dp" + android:layout_weight="1" + android:background="?colorAccent" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + android:text="@string/settings_category_notif_advanced" + android:textColor="?colorAccent" + android:textSize="16sp" /> + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_margin="10dp" + android:layout_weight="1" + android:background="?colorAccent" /> + </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5087d9d8e..c5f13fd29 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -919,6 +919,11 @@ <string name="vote">Vote</string> <string name="poll_not_private">A poll cannot be attached to a direct message!</string> <string name="notif_poll">A poll you have voted in has ended</string> + <string name="settings_category_notif_customize">Customize</string> + <string name="settings_category_notif_categories">Categories</string> + <string name="settings_category_notif_news">News</string> + <string name="settings_category_notif_time_slot">Time slot</string> + <string name="settings_category_notif_advanced">Advanced</string> <plurals name="number_of_vote"> <item quantity="one">%d vote</item> |