From 5c097c6d3cace8a67688929d8cca2216b24ad3ae Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Fri, 12 Apr 2019 16:52:40 -0400 Subject: [PATCH] Redesign channel listing and channel page Test: atest Bug: 127796543 Fixes: 129452112 Fixes: 129453207 Change-Id: I1d520c9e35860303235b7ffbb18a76cbc4f4b8bc --- res/drawable/button_border_selected.xml | 23 +++ res/drawable/button_border_unselected.xml | 24 +++ res/drawable/button_ripple_radius.xml | 26 +++ res/drawable/ic_notification_alert.xml | 20 +-- res/drawable/ic_notification_silence.xml | 22 ++- res/layout/notif_importance_preference.xml | 111 +++++------- res/values/colors.xml | 5 +- res/values/dimens.xml | 15 +- res/values/strings.xml | 29 +-- res/values/styles.xml | 20 +++ res/xml/channel_notification_settings.xml | 11 +- .../notification/AppNotificationSettings.java | 3 +- .../ChannelNotificationSettings.java | 1 + .../ChannelSummaryPreference.java | 115 ------------ .../notification/ImportancePreference.java | 139 +++++++------- .../ImportancePreferenceController.java | 16 +- .../notification/NotificationBackend.java | 9 + .../NotificationSettingsBase.java | 53 ++++-- .../ChannelSummaryPreferenceTest.java | 169 ------------------ .../ImportancePreferenceControllerTest.java | 6 +- .../ImportancePreferenceTest.java | 167 +++++++++-------- 21 files changed, 405 insertions(+), 579 deletions(-) create mode 100644 res/drawable/button_border_selected.xml create mode 100644 res/drawable/button_border_unselected.xml create mode 100644 res/drawable/button_ripple_radius.xml delete mode 100644 src/com/android/settings/notification/ChannelSummaryPreference.java delete mode 100644 tests/robotests/src/com/android/settings/notification/ChannelSummaryPreferenceTest.java diff --git a/res/drawable/button_border_selected.xml b/res/drawable/button_border_selected.xml new file mode 100644 index 00000000000..2681bf051b4 --- /dev/null +++ b/res/drawable/button_border_selected.xml @@ -0,0 +1,23 @@ + + + + + + \ No newline at end of file diff --git a/res/drawable/button_border_unselected.xml b/res/drawable/button_border_unselected.xml new file mode 100644 index 00000000000..72e9076ccf2 --- /dev/null +++ b/res/drawable/button_border_unselected.xml @@ -0,0 +1,24 @@ + + + + + + + \ No newline at end of file diff --git a/res/drawable/button_ripple_radius.xml b/res/drawable/button_ripple_radius.xml new file mode 100644 index 00000000000..511520c2866 --- /dev/null +++ b/res/drawable/button_ripple_radius.xml @@ -0,0 +1,26 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/drawable/ic_notification_alert.xml b/res/drawable/ic_notification_alert.xml index 07e7b48700b..927f7ccfc3c 100644 --- a/res/drawable/ic_notification_alert.xml +++ b/res/drawable/ic_notification_alert.xml @@ -19,25 +19,23 @@ Copyright (C) 2019 The Android Open Source Project android:id="@+id/back"> + android:color="@color/notification_alert_color" /> - + android:height="24dp" + android:width="24dp"/> + android:width="13dp" + android:height="13dp" + android:viewportWidth="24" + android:viewportHeight="24"> + android:fillColor="#FFFFFFFF" + android:pathData="M8.98,16.65c-0.47,0 -0.91,-0.27 -1.12,-0.69l-1.93,-4.61L5.46,12.3c-0.21,0.43 -0.64,0.69 -1.12,0.69H2v-2h1.88l1,-2C5.1,8.56 5.52,8.3 6,8.3s0.9,0.26 1.12,0.69l1.73,4.14l2,-7c0.2,-0.46 0.65,-0.76 1.15,-0.76s0.95,0.3 1.15,0.76l0.04,0.12l1.96,6.88l1.7,-4.08c0.49,-0.98 1.84,-0.91 2.26,-0.06l1,2H22v2h-2.35c-0.47,0 -0.91,-0.27 -1.12,-0.7l-0.47,-0.95l-1.9,4.55c-0.25,0.5 -0.69,0.77 -1.18,0.75c-0.48,-0.01 -0.92,-0.31 -1.11,-0.76l-0.04,-0.12L12,9.37l-1.87,6.52c-0.19,0.45 -0.63,0.74 -1.11,0.76C9.01,16.65 9,16.65 8.98,16.65zM20.32,11.4L20.32,11.4C20.32,11.4 20.32,11.4 20.32,11.4z" /> \ No newline at end of file diff --git a/res/drawable/ic_notification_silence.xml b/res/drawable/ic_notification_silence.xml index 673340f6532..9da56dd0bbf 100644 --- a/res/drawable/ic_notification_silence.xml +++ b/res/drawable/ic_notification_silence.xml @@ -19,25 +19,23 @@ Copyright (C) 2019 The Android Open Source Project android:id="@+id/back"> + android:color="@color/notification_silence_color" /> - + android:height="24dp" + android:width="24dp"/> + android:width="13dp" + android:height="13dp" + android:viewportWidth="24" + android:viewportHeight="24"> + android:fillColor="#FFFFFFFF" + android:pathData="M15,14.5c-1.38,0 -2.5,-1.12 -2.5,-2.5c0,-0.28 -0.22,-0.5 -0.5,-0.5s-0.5,0.22 -0.5,0.5c0,1.38 -1.12,2.5 -2.5,2.5S6.5,13.38 6.5,12c0,-0.28 -0.22,-0.5 -0.5,-0.5c-0.24,0 -0.46,0.18 -0.49,0.42C5.41,12.55 4.89,13 4.27,13H2v-2h1.71C4.1,10.11 5,9.5 6,9.5c1.38,0 2.5,1.12 2.5,2.5c0,0.28 0.22,0.5 0.5,0.5s0.5,-0.22 0.5,-0.5c0,-1.38 1.12,-2.5 2.5,-2.5s2.5,1.12 2.5,2.5c0,0.28 0.22,0.5 0.5,0.5s0.5,-0.22 0.5,-0.5c0,-1.38 1.12,-2.5 2.5,-2.5c1.02,0 1.91,0.6 2.29,1.5H22v2h-2.27c-0.62,0 -1.14,-0.45 -1.23,-1.08c-0.04,-0.24 -0.25,-0.42 -0.49,-0.42c-0.28,0 -0.5,0.22 -0.5,0.5C17.5,13.38 16.38,14.5 15,14.5z"/> - \ No newline at end of file + diff --git a/res/layout/notif_importance_preference.xml b/res/layout/notif_importance_preference.xml index 5d79ff3af67..bc0d5aa90b3 100644 --- a/res/layout/notif_importance_preference.xml +++ b/res/layout/notif_importance_preference.xml @@ -21,84 +21,53 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" - android:orientation="horizontal"> + android:orientation="vertical"> - - +