From 7f3526a1a4d5d3578d4648abb1422646d23c6080 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 21 Feb 2017 15:16:12 -0800 Subject: Update notification view to match newer specs - Use smaller radius for notifications round rect background - Remove "Notifications" header, and clip children to round rect path - Flip main notification so that icon shows on the right instead of left; footer is also flipped so animation makes sense - Clean up animations to animate view outline instead of height Bug: 32410600 Change-Id: I6bd1e1f8395b3703f28c3b0056a89e67672368ab --- res/drawable/bg_white_pill_bottom.xml | 22 ---------------------- res/drawable/bg_white_pill_top.xml | 22 ---------------------- res/drawable/bg_white_round_rect.xml | 21 +++++++++++++++++++++ res/layout/notification.xml | 21 ++------------------- res/layout/notification_footer.xml | 2 +- res/layout/notification_main.xml | 17 +++++++++-------- res/values/dimens.xml | 13 ++++++------- 7 files changed, 39 insertions(+), 79 deletions(-) delete mode 100644 res/drawable/bg_white_pill_bottom.xml delete mode 100644 res/drawable/bg_white_pill_top.xml create mode 100644 res/drawable/bg_white_round_rect.xml (limited to 'res') diff --git a/res/drawable/bg_white_pill_bottom.xml b/res/drawable/bg_white_pill_bottom.xml deleted file mode 100644 index a1ea48cec..000000000 --- a/res/drawable/bg_white_pill_bottom.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/res/drawable/bg_white_pill_top.xml b/res/drawable/bg_white_pill_top.xml deleted file mode 100644 index 9988b2913..000000000 --- a/res/drawable/bg_white_pill_top.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/res/drawable/bg_white_round_rect.xml b/res/drawable/bg_white_round_rect.xml new file mode 100644 index 000000000..c7f786ff6 --- /dev/null +++ b/res/drawable/bg_white_round_rect.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/res/layout/notification.xml b/res/layout/notification.xml index d828c4a36..48c7b48b9 100644 --- a/res/layout/notification.xml +++ b/res/layout/notification.xml @@ -20,7 +20,7 @@ android:layout_width="@dimen/bg_pill_width" android:layout_height="wrap_content" android:elevation="@dimen/deep_shortcuts_elevation" - android:background="@drawable/bg_white_pill"> + android:background="@drawable/bg_white_round_rect"> - - - - + android:layout_height="@dimen/notification_main_height" /> @@ -34,6 +33,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" + android:gravity="end" android:padding="@dimen/notification_footer_icon_row_padding" android:clipToPadding="false" android:clipChildren="false"/> diff --git a/res/layout/notification_main.xml b/res/layout/notification_main.xml index 84827f114..d036fe5d2 100644 --- a/res/layout/notification_main.xml +++ b/res/layout/notification_main.xml @@ -21,20 +21,14 @@ android:layout_height="match_parent" android:orientation="horizontal" android:focusable="true" + android:padding="@dimen/notification_padding" android:elevation="@dimen/notification_elevation" > - - + + diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 517bf9f79..177e08e2f 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -175,19 +175,18 @@ 24dp 12dp - 1dp + 0dp 3dp 28dp 24dp - + 12dp + 12dp + 2dp - 8dp - 8dp - 36dp - - @dimen/bg_pill_radius + 60dp + @dimen/bg_pill_height 2dp 0.5dp 70dp -- cgit v1.2.3