diff options
author | Tony Wickham <twickham@google.com> | 2016-07-15 17:23:07 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2016-07-19 13:58:51 -0700 |
commit | 8f58e61d02fcb0ca90a2803e76a8792ec2c1f99a (patch) | |
tree | 2cba823be7962a2100c62acf086784f69fcae0fc /res | |
parent | 1e3d490e08b06750d467e144e5d74ea420c59613 (diff) | |
download | android_packages_apps_Trebuchet-8f58e61d02fcb0ca90a2803e76a8792ec2c1f99a.tar.gz android_packages_apps_Trebuchet-8f58e61d02fcb0ca90a2803e76a8792ec2c1f99a.tar.bz2 android_packages_apps_Trebuchet-8f58e61d02fcb0ca90a2803e76a8792ec2c1f99a.zip |
Update shortcut animations.
- Open animation: shortcuts reveal using modified circular reveal
(so that it reveals in the pill shape instead of a circle);
slight translation away from the original icon; scale icon and text.
- Hover animation: scale the shortcut pill and translate others away.
Bug: 28980830
Bug: 30127368
Change-Id: I8ed05c7a082f2c2a3f6c663da7259f6cd33e394f
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/bg_white_pill.xml | 3 | ||||
-rw-r--r-- | res/layout/deep_shortcut.xml | 12 | ||||
-rw-r--r-- | res/values/config.xml | 5 | ||||
-rw-r--r-- | res/values/dimens.xml | 6 | ||||
-rw-r--r-- | res/values/styles.xml | 3 |
5 files changed, 21 insertions, 8 deletions
diff --git a/res/drawable/bg_white_pill.xml b/res/drawable/bg_white_pill.xml index 29c3145cc..186b06b67 100644 --- a/res/drawable/bg_white_pill.xml +++ b/res/drawable/bg_white_pill.xml @@ -17,6 +17,5 @@ <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@color/quantum_panel_bg_color" /> - <size android:height="48dp" /> - <corners android:radius="24dp" /> + <corners android:radius="@dimen/bg_pill_radius" /> </shape>
\ No newline at end of file diff --git a/res/layout/deep_shortcut.xml b/res/layout/deep_shortcut.xml index b87923564..089546033 100644 --- a/res/layout/deep_shortcut.xml +++ b/res/layout/deep_shortcut.xml @@ -16,5 +16,13 @@ <com.android.launcher3.shortcuts.DeepShortcutView xmlns:android="http://schemas.android.com/apk/res/android" - style="@style/Icon.DeepShortcut" - android:focusable="true"/> + android:layout_width="@dimen/bg_pill_width" + android:layout_height="@dimen/bg_pill_height" + android:elevation="@dimen/deep_shortcuts_elevation" + android:background="@drawable/bg_white_pill"> + + <com.android.launcher3.BubbleTextView + android:id="@+id/deep_shortcut" + style="@style/Icon.DeepShortcut" + android:focusable="true"/> +</com.android.launcher3.shortcuts.DeepShortcutView> diff --git a/res/values/config.xml b/res/values/config.xml index a678958bb..bdedff0df 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -86,6 +86,11 @@ <!-- View ID used by cell layout to jail its content --> <item type="id" name="cell_layout_jail_id" /> +<!-- Deep shortcuts --> + <integer name="config_deepShortcutOpenDuration">300</integer> + <integer name="config_deepShortcutOpenStagger">20</integer> + <integer name="config_deepShortcutHoverDuration">120</integer> + <!-- Accessibility actions --> <item type="id" name="action_remove" /> <item type="id" name="action_uninstall" /> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 38775f14f..8b02e5aac 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -152,12 +152,16 @@ <!-- Deep shortcuts --> <dimen name="deep_shortcuts_elevation">9dp</dimen> - <dimen name="deep_shortcuts_width">180dp</dimen> + <dimen name="bg_pill_width">180dp</dimen> + <dimen name="bg_pill_height">48dp</dimen> + <dimen name="bg_pill_radius">24dp</dimen> <dimen name="deep_shortcuts_spacing">4dp</dimen> <dimen name="deep_shortcuts_drag_view_scale">6dp</dimen> <!-- an icon with shortcuts must be dragged this much distance away from the nearest edge of the shortcut container before the container is removed. --> <dimen name="deep_shortcuts_start_drag_threshold">35dp</dimen> <dimen name="deep_shortcut_icon_size">36dp</dimen> + <dimen name="deep_shortcuts_arrow_horizontal_offset">19dp</dimen> + <dimen name="deep_shortcut_anim_translation_y">5dp</dimen> </resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index 3e827a643..532b701d0 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -78,10 +78,7 @@ </style> <style name="Icon.DeepShortcut"> - <item name="android:background">@drawable/bg_white_pill</item> <item name="android:gravity">start|center_vertical</item> - <item name="android:minWidth">@dimen/deep_shortcuts_width</item> - <item name="android:maxWidth">@dimen/deep_shortcuts_width</item> <item name="android:elevation">@dimen/deep_shortcuts_elevation</item> <item name="android:paddingLeft">7dp</item> <item name="android:drawablePadding">12dp</item> |