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

Commit 58993ad1 authored by Adam Cohen's avatar Adam Cohen
Browse files

Clean up interpolators on overview mode transition fades

Change-Id: Id10292286cba217ad18e77f7273e497efac4708c
parent 0007472e
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1950,6 +1950,9 @@ public class Workspace extends SmoothPagedView

        boolean workspaceToAllApps = (oldStateIsNormal && stateIsSmall);
        boolean allAppsToWorkspace = (oldStateIsSmall && stateIsNormal);
        boolean workspaceToOverview = (oldStateIsNormal && stateIsOverview);
        boolean overviewToWorkspace = (oldStateIsOverview && stateIsNormal);

        mNewScale = 1.0f;

        if (oldStateIsOverview) {
@@ -2062,11 +2065,16 @@ public class Workspace extends SmoothPagedView
            hotseatAlpha.addUpdateListener(new AlphaUpdateListener(hotseat));
            searchBarAlpha.addUpdateListener(new AlphaUpdateListener(searchBar));

            if (workspaceToOverview) {
                hotseatAlpha.setInterpolator(new DecelerateInterpolator(2));
            } else if (overviewToWorkspace) {
                overviewPanelAlpha.setInterpolator(new DecelerateInterpolator(2));
            }

            if (getPageIndicator() != null) {
                pageIndicatorAlpha.addUpdateListener(new AlphaUpdateListener(getPageIndicator()));
            }


            anim.play(overviewPanelAlpha);
            anim.play(hotseatAlpha);
            anim.play(searchBarAlpha);