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

Commit ad6b0444 authored by Pat Manning's avatar Pat Manning
Browse files

Adjust app chip menu top margin.

Include adjusting gap of menu when expanding app chip.

Fix: 313648444
Test: OverviewImageTest
Flag: ACONFIG com.android.launcher3.enable_overview_icon_menu TEAMFOOD
Change-Id: Iea8ea76873ac008b90b6a8f183dc99cba9237041
parent 2e54a166
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -73,9 +73,9 @@
    <!--  The margin at the start of the task icon menu  -->
    <dimen name="task_thumbnail_icon_menu_start_margin">12dp</dimen>
    <!--  The margin at the top of the task icon menu  -->
    <dimen name="task_thumbnail_icon_menu_top_margin">6dp</dimen>
    <!--  The margin at the top of the task icon menu when expanded  -->
    <dimen name="task_thumbnail_icon_menu_top_margin_expanded">4dp</dimen>
    <dimen name="task_thumbnail_icon_menu_top_margin">12dp</dimen>
    <!--  The gap at the top of the task icon menu when expanded  -->
    <dimen name="task_thumbnail_icon_menu_expanded_gap">6dp</dimen>
    <!--  The margin at the start of the task icon view in the icon menu  -->
    <dimen name="task_thumbnail_icon_view_start_margin">6dp</dimen>
    <!--  The space around the task icon arrow within the icon menu  -->
+5 −5
Original line number Diff line number Diff line
@@ -311,14 +311,14 @@ public class TaskMenuView extends AbstractFloatingView {
                        - mActivity.getDeviceProfile().getOverviewActionsClaimedSpaceBelow();
                float midpoint = (taskBottom + taskbarTop) / 2f;
                additionalTranslationY = -Math.max(menuBottom - midpoint, 0);
            } else {
                // Animate the menu to leave a small margin at the top of the task.
                additionalTranslationY = getResources().getDimensionPixelSize(
                        R.dimen.task_thumbnail_icon_menu_top_margin_expanded);
            }
            // Translate the menu to account for the expansion of the app chip menu as well.
            float expandOffsetTranslationY = getResources().getDimensionPixelSize(
                    R.dimen.task_thumbnail_icon_menu_expanded_gap);
            ObjectAnimator translationYAnim = ObjectAnimator.ofFloat(this, TRANSLATION_Y,
                    closing ? mMenuTranslationYBeforeOpen
                            : mMenuTranslationYBeforeOpen + additionalTranslationY);
                            : mMenuTranslationYBeforeOpen + additionalTranslationY
                                    + expandOffsetTranslationY);
            translationYAnim.setInterpolator(EMPHASIZED);

            ObjectAnimator menuTranslationYAnim = ObjectAnimator.ofFloat(