From 9438ed414fdabadb4cd09da184867b1c44b91095 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Fri, 20 Jan 2017 09:38:25 -0800 Subject: Add swipe-to-dismiss notifications in popup menu. - Next secondary icon animates up to replace dismissed main notification - Add padding around main notification so it always aligns with the straight edges of the view (not the rounded corners); looks more dismissable - Notification view collapses as notifications are dismissed - To mimic system notification behavior, we copy SwipeHelper, FlingAnimationUtils, and Interpolators. We also apply elevation to notifications and reveal a darker color beneath when dismissing. Bug: 32410600 Change-Id: I9fbf10e73bb4996f17ef061c856efb013967d972 --- res/layout/notification.xml | 61 ++++++++++++++++++++++++++++++++++++++ res/layout/notification_footer.xml | 42 ++++++++++++++++++++++++++ res/layout/notification_main.xml | 54 +++++++++++++++++++++++++++++++++ 3 files changed, 157 insertions(+) create mode 100644 res/layout/notification.xml create mode 100644 res/layout/notification_footer.xml create mode 100644 res/layout/notification_main.xml (limited to 'res/layout') diff --git a/res/layout/notification.xml b/res/layout/notification.xml new file mode 100644 index 000000000..d828c4a36 --- /dev/null +++ b/res/layout/notification.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + diff --git a/res/layout/notification_footer.xml b/res/layout/notification_footer.xml new file mode 100644 index 000000000..ceea24a66 --- /dev/null +++ b/res/layout/notification_footer.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + diff --git a/res/layout/notification_main.xml b/res/layout/notification_main.xml new file mode 100644 index 000000000..efb74b0f7 --- /dev/null +++ b/res/layout/notification_main.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + -- cgit v1.2.3