From 8f58e61d02fcb0ca90a2803e76a8792ec2c1f99a Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Fri, 15 Jul 2016 17:23:07 -0700 Subject: [PATCH] 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 --- res/drawable/bg_white_pill.xml | 3 +- res/layout/deep_shortcut.xml | 12 ++- res/values/config.xml | 5 + res/values/dimens.xml | 6 +- res/values/styles.xml | 3 - .../LauncherStateTransitionAnimation.java | 10 +- src/com/android/launcher3/folder/Folder.java | 6 +- .../launcher3/shortcuts/DeepShortcutView.java | 109 ++++++++++++++++++--- .../shortcuts/DeepShortcutsContainer.java | 80 ++++++++++----- .../util/CircleRevealOutlineProvider.java | 57 +++++++++++ .../launcher3/util/PillRevealOutlineProvider.java | 66 +++++++++++++ .../launcher3/util/RevealOutlineAnimation.java | 72 ++++++++++++++ .../launcher3/util/RevealOutlineProvider.java | 49 --------- .../launcher3/util/UiThreadCircularReveal.java | 57 ----------- 14 files changed, 378 insertions(+), 157 deletions(-) create mode 100644 src/com/android/launcher3/util/CircleRevealOutlineProvider.java create mode 100644 src/com/android/launcher3/util/PillRevealOutlineProvider.java create mode 100644 src/com/android/launcher3/util/RevealOutlineAnimation.java delete mode 100644 src/com/android/launcher3/util/RevealOutlineProvider.java delete mode 100644 src/com/android/launcher3/util/UiThreadCircularReveal.java 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 @@ - - + \ 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 @@ + 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"> + + + 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 @@ + + 300 + 20 + 120 + 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 @@ 9dp - 180dp + 180dp + 48dp + 24dp 4dp 6dp 35dp 36dp + 19dp + 5dp 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 @@