summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2017-06-22 14:22:40 -0700
committerTony <twickham@google.com>2017-06-27 19:43:18 -0700
commitaa2272f81cc4a62f847db777efda7959cc2b9979 (patch)
tree31fe70125c6918bdde27828d378609310e484da9 /res
parentd032d2cea4c453c626832a85c4b7bf5241f237dc (diff)
downloadandroid_packages_apps_Trebuchet-aa2272f81cc4a62f847db777efda7959cc2b9979.tar.gz
android_packages_apps_Trebuchet-aa2272f81cc4a62f847db777efda7959cc2b9979.tar.bz2
android_packages_apps_Trebuchet-aa2272f81cc4a62f847db777efda7959cc2b9979.zip
Popup visual changes
- Don't remove elevation during animation (b/62905720) - Other adjustments (b/35766387) - Add "gutter" between notification and shortcuts - Change shortcuts to always be primary color (e.g. white) - Scale down shortcut icons when notifications present - Apply icon extracted color to "Notifications" header Change-Id: Idf791dc76d15d05d246000ad73810916d7cd1750
Diffstat (limited to 'res')
-rw-r--r--res/drawable/gutter_horizontal.xml9
-rw-r--r--res/layout/notification.xml24
-rw-r--r--res/layout/notification_main.xml2
-rw-r--r--res/values/dimens.xml1
-rw-r--r--res/values/styles.xml7
5 files changed, 38 insertions, 5 deletions
diff --git a/res/drawable/gutter_horizontal.xml b/res/drawable/gutter_horizontal.xml
new file mode 100644
index 000000000..95b03df27
--- /dev/null
+++ b/res/drawable/gutter_horizontal.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This "gutter" has a shadow at the top and a subtler shadow on the bottom. -->
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <gradient android:type="linear"
+ android:angle="-90"
+ android:startColor="#ffE0E0E0"
+ android:centerColor="#ffffffff"
+ android:endColor="#ffF5F5F5" />
+</shape> \ No newline at end of file
diff --git a/res/layout/notification.xml b/res/layout/notification.xml
index 085dfa93c..4a02aa169 100644
--- a/res/layout/notification.xml
+++ b/res/layout/notification.xml
@@ -28,6 +28,13 @@
android:orientation="vertical"
android:clipChildren="false">
+ <View
+ android:id="@+id/gutter_top"
+ android:layout_width="match_parent"
+ android:layout_height="4dp"
+ android:theme="@style/PopupGutter"
+ android:visibility="gone" />
+
<FrameLayout
android:id="@+id/header"
android:layout_width="match_parent"
@@ -35,22 +42,23 @@
android:paddingStart="@dimen/notification_padding_start"
android:paddingEnd="@dimen/notification_padding_end"
android:background="?attr/popupColorPrimary"
- android:elevation="@dimen/notification_elevation">
+ android:elevation="@dimen/notification_elevation"
+ android:layout_below="@id/gutter_top" >
<TextView
android:id="@+id/notification_text"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
- android:gravity="center_vertical"
+ android:gravity="bottom"
android:text="@string/notifications_header"
android:textSize="@dimen/notification_header_text_size"
- android:textColor="?android:attr/textColorSecondary" />
+ android:textColor="?android:attr/textColorPrimary" />
<TextView
android:id="@+id/notification_count"
android:layout_width="@dimen/notification_icon_size"
android:layout_height="match_parent"
android:layout_gravity="end"
- android:gravity="center"
+ android:gravity="bottom|center_horizontal"
android:textSize="@dimen/notification_header_count_text_size"
android:fontFamily="sans-serif-medium"
android:textColor="?android:attr/textColorPrimary" />
@@ -76,6 +84,14 @@
android:layout_height="@dimen/notification_footer_height"
android:layout_below="@id/divider" />
+ <View
+ android:id="@+id/gutter_bottom"
+ android:layout_width="match_parent"
+ android:layout_height="4dp"
+ android:theme="@style/PopupGutter"
+ android:visibility="gone"
+ android:layout_below="@id/footer" />
+
</RelativeLayout>
</com.android.launcher3.notification.NotificationItemView>
diff --git a/res/layout/notification_main.xml b/res/layout/notification_main.xml
index 7a8cf6d5c..f681e8b06 100644
--- a/res/layout/notification_main.xml
+++ b/res/layout/notification_main.xml
@@ -38,7 +38,7 @@
android:layout_height="wrap_content"
android:textAlignment="viewStart"
android:fontFamily="sans-serif"
- android:textSize="@dimen/notification_main_text_size"
+ android:textSize="@dimen/notification_main_title_size"
android:textColor="?android:attr/textColorPrimary"
android:lines="1"
android:ellipsize="end" />
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index a4dff7190..980b71483 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -213,6 +213,7 @@
<dimen name="notification_footer_height">32dp</dimen>
<dimen name="notification_header_text_size">13sp</dimen>
<dimen name="notification_header_count_text_size">12sp</dimen>
+ <dimen name="notification_main_title_size">16sp</dimen>
<dimen name="notification_main_text_size">14sp</dimen>
<dimen name="notification_icon_size">24dp</dimen>
<dimen name="notification_footer_icon_size">18dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index d11b00208..813fe8f29 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -140,6 +140,13 @@
<style name="PopupItem">
<item name="android:colorControlHighlight">?attr/popupColorTertiary</item>
</style>
+ <style name="PopupGutter">
+ <item name="android:backgroundTintMode">multiply</item>
+ <item name="android:backgroundTint">?attr/popupColorSecondary</item>
+ <item name="android:background">@drawable/gutter_horizontal</item>
+ <item name="android:elevation">@dimen/notification_elevation</item>
+ <item name="android:outlineProvider">none</item>
+ </style>
<!-- Drop targets -->
<style name="DropTargetButtonBase">