diff options
author | Tony <twickham@google.com> | 2017-05-30 21:22:06 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2017-06-15 16:21:34 -0700 |
commit | 887bd1fe1af9a37aad78ad51f5b38b265aa09c3a (patch) | |
tree | 9c1b74b18d46db8c07bf7be343620a2400ae8ad8 /res/layout | |
parent | 7847d10f389425a92e11b29f181acbbebc8b1dab (diff) | |
download | android_packages_apps_Trebuchet-887bd1fe1af9a37aad78ad51f5b38b265aa09c3a.tar.gz android_packages_apps_Trebuchet-887bd1fe1af9a37aad78ad51f5b38b265aa09c3a.tar.bz2 android_packages_apps_Trebuchet-887bd1fe1af9a37aad78ad51f5b38b265aa09c3a.zip |
Show more shortcuts when last notification is dimissed
We currently only show 2 shortcuts when notifications are
present, but support up to 4 otherwise. With this change,
the hidden shortcuts are added back after dismissing the
notifications, instead of only after closing and reopening
the container.
To ensure the transition is as elegant as possible, we also
separated the shortcuts header from the rest of the shortcuts.
That way we can reveal the new shortcuts without removing the
header (the shortcuts come out from behind the header).
Bug: 38036250
Change-Id: Ie9ab35f9be57cec1d5345e9e70e84e09ea52c9fc
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/shortcuts_item.xml | 10 | ||||
-rw-r--r-- | res/layout/system_shortcut_icons.xml | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/res/layout/shortcuts_item.xml b/res/layout/shortcuts_item.xml index e54462e7a..7cd996de0 100644 --- a/res/layout/shortcuts_item.xml +++ b/res/layout/shortcuts_item.xml @@ -22,10 +22,18 @@ android:elevation="@dimen/deep_shortcuts_elevation"> <LinearLayout - android:id="@+id/deep_shortcuts" + android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> + + <!-- The shortcuts header is added at runtime when necessary. --> + + <LinearLayout + android:id="@+id/shortcuts" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" /> </LinearLayout> </com.android.launcher3.shortcuts.ShortcutsItemView> diff --git a/res/layout/system_shortcut_icons.xml b/res/layout/system_shortcut_icons.xml index db59d4962..34d63e71f 100644 --- a/res/layout/system_shortcut_icons.xml +++ b/res/layout/system_shortcut_icons.xml @@ -21,4 +21,7 @@ android:layout_height="@dimen/system_shortcut_header_height" android:orientation="horizontal" android:gravity="end|center_vertical" - android:background="?attr/popupColorSecondary" /> + android:background="?attr/popupColorSecondary" + android:elevation="1dp" + android:outlineProvider="none" /> + <!-- We have elevation so this is drawn on top, but no outline provider to remove shadow --> |