Focus running task in overview grid

- calculateTaskSize now returns the Rect for focused task
- Introduced calculateGridTaskSize for non-focused task, and translate non-focused tasks to fit the grid
- As Task Rect is now vertically centered, removed ClearAllButton's grid vertical translation
- When ClearAllButton is not shown (e.g. quickswitch), make sure ClearAllButton's scroll won't be used when page snapping. This happens when page scrolls are translated so they're negative.
- Added back ActionsView when task is focused below the TaskView, which become invisible as you scroll
- In Modal state, move the ActionsView down so it won't cover the TaskView

Bug: 175939487
Test: manual
Change-Id: Idfa94a51f856418adc0503cf04211dcb4b1814fe
This commit is contained in:
Alex Chau committed 2021-04-01 14:52:25 +01:00
1 parent 21dfadab76
commit dfde4d96ea
16 files changed
+353 -129

No files matched your search

@@ -99,8 +99,7 @@ public class OverviewState extends LauncherState {
@Override
public int getVisibleElements(Launcher launcher) {
return displayOverviewTasksAsGrid(launcher.getDeviceProfile()) ? CLEAR_ALL_BUTTON
: CLEAR_ALL_BUTTON | OVERVIEW_ACTIONS;
return CLEAR_ALL_BUTTON | OVERVIEW_ACTIONS;
}
@Override