Show overview as grid in fallback recents

- Replace mShowAsGrid with state specific mOverviewGridEnabled and mCurrentGestureEndTarget
- Avoid showing invisible home task in grid
- Fix quick switch out of orientation in fallback recents
- Add a HOME state to switch to when starting home, to avoid showing grid overview briefly in quick switch
- Separate clear all button and overview actions handling
- Always maintain first task's fullscreen translation at 0 to avoid jumping when mOverviewFullscreenEnabled changes
- Moved fullscreenTranslation calculation to RecentsView
- Added GestureEndTarget -> BaseState translation to allow querying displayOverviewAsGrid for a displayOverviewTasksAsGrid

Bug: 174464863
Test: Launch overveiw from home, launch overveiw from app, launch into app, test for both small and large screens
Change-Id: Iee06d94d3067ea45cadd2051717223ddc0e6e70c
This commit is contained in:
Alex Chau
2021-03-11 20:16:54 +00:00
parent 2b30076aba
commit ecd12b32c9
19 changed files with 222 additions and 97 deletions

View File

@@ -76,8 +76,8 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
SCRIM_PROGRESS.set(scrim, state.getOverviewScrimAlpha(mLauncher));
SCRIM_MULTIPLIER.set(scrim, 1f);
getTaskModalnessProperty().set(mRecentsView, state.getOverviewModalness());
RECENTS_GRID_PROGRESS.set(mRecentsView, state.displayOverviewTasksAsGrid(mLauncher)
? 1f : 0f);
RECENTS_GRID_PROGRESS.set(mRecentsView,
state.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()) ? 1f : 0f);
}
@Override
@@ -128,7 +128,7 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
toState.getOverviewModalness(),
config.getInterpolator(ANIM_OVERVIEW_MODAL, LINEAR));
setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS,
toState.displayOverviewTasksAsGrid(mLauncher) ? 1f : 0f, LINEAR);
toState.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()) ? 1f : 0f, LINEAR);
}
abstract FloatProperty getTaskModalnessProperty();