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

Commit 126fbd2e authored by Matt Sziklay's avatar Matt Sziklay Committed by Android (Google) Code Review
Browse files

Merge "Fix Manage Windows alpha animation." into main

parents faf025ec cc71d7fe
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -133,6 +133,7 @@ abstract class ManageWindowsViewContainer(
                null
            )
            menuBackground.paint.color = menuBackgroundColor
            scrollableMenuView.alpha = 0f
            scrollableMenuView.background = menuBackground
            scrollableMenuView.elevation = getDimensionPixelSize(MENU_ELEVATION_DP)
            scrollableMenuView.setOnTouchListener { _, event ->
@@ -203,6 +204,7 @@ abstract class ManageWindowsViewContainer(
                    menuWidth += (instanceIconWidth + iconMargin).toInt()
                }
                rowLayout?.addView(appSnapshotButton)
                appSnapshotButton.alpha = 0f
                iconViews += appSnapshotButton
                appSnapshotButton.requestLayout()
                rowLayout?.post {
@@ -254,7 +256,7 @@ abstract class ManageWindowsViewContainer(
            )
            for (view in iconViews) {
                animateView(view, MENU_BOUNDS_SHRUNK_SCALE, MENU_BOUNDS_FULL_SCALE,
                    MENU_START_ALPHA, MENU_FULL_ALPHA
                    MENU_START_ALPHA, MENU_FULL_ALPHA, delay = MENU_ALPHA_ANIM_DELAY
                )
            }
            createAnimatorSet().start()
@@ -267,7 +269,7 @@ abstract class ManageWindowsViewContainer(
            )
            for (view in iconViews) {
                animateView(view, MENU_BOUNDS_FULL_SCALE, MENU_BOUNDS_SHRUNK_SCALE,
                    MENU_FULL_ALPHA, MENU_START_ALPHA
                    MENU_FULL_ALPHA, MENU_START_ALPHA, delay = MENU_ALPHA_ANIM_DELAY
                )
            }
            createAnimatorSet().apply {
@@ -287,7 +289,9 @@ abstract class ManageWindowsViewContainer(
            startBoundsScale: Float,
            endBoundsScale: Float,
            startAlpha: Float,
            endAlpha: Float) {
            endAlpha: Float,
            delay: Long = 0
        ) {
            animators += ObjectAnimator.ofFloat(
                view,
                SCALE_X,
@@ -311,7 +315,7 @@ abstract class ManageWindowsViewContainer(
                endAlpha
            ).apply {
                duration = MENU_ALPHA_ANIM_DURATION
                startDelay = MENU_ALPHA_ANIM_DELAY
                startDelay = delay
            }
        }