Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f58e61d authored by Tony Wickham's avatar Tony Wickham
Browse files

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
parent 1e3d490e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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
+10 −2
Original line number Diff line number Diff line
@@ -16,5 +16,13 @@

<com.android.launcher3.shortcuts.DeepShortcutView
    xmlns:android="http://schemas.android.com/apk/res/android"
    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>
+5 −0
Original line number Diff line number Diff line
@@ -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" />
+5 −1
Original line number Diff line number Diff line
@@ -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>
+0 −3
Original line number Diff line number Diff line
@@ -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>
Loading