Adding a new Edit Mode LauncherState

- Edit Mode doesn't close after dragging / dropping an app
	- Edit Mode can be entered through options popup menu, Spring Loaded still entered by dragging items
	- Adds new onLeavingState call to launcher states to cleanup changes

Bug: 279590398
Flag: MULTI_SELECT_EDIT_MODE
Test: manually tested the new state with flag on/off

Change-Id: If4550037f9659dcb8cd8b1943388d1ec5d55fa29
This commit is contained in:
Charlie Anderson
2023-04-25 14:38:57 -04:00
parent fda9f3d430
commit 438d405aab
15 changed files with 166 additions and 49 deletions

View File

@@ -59,6 +59,7 @@ import com.android.launcher3.anim.PropertySetter;
import com.android.launcher3.anim.SpringAnimationBuilder;
import com.android.launcher3.graphics.Scrim;
import com.android.launcher3.graphics.SysUiScrim;
import com.android.launcher3.states.EditModeState;
import com.android.launcher3.states.SpringLoadedState;
import com.android.launcher3.states.StateAnimationConfig;
import com.android.launcher3.util.DynamicResource;
@@ -212,8 +213,8 @@ public class WorkspaceStateTransitionAnimation {
PageAlphaProvider pageAlphaProvider, PropertySetter propertySetter,
StateAnimationConfig config) {
float pageAlpha = pageAlphaProvider.getPageAlpha(childIndex);
float springLoadedProgress = (state instanceof SpringLoadedState) ? 1.0f : 0f;
float springLoadedProgress =
(state instanceof SpringLoadedState || state instanceof EditModeState) ? 1f : 0f;
propertySetter.setFloat(cl,
CellLayout.SPRING_LOADED_PROGRESS, springLoadedProgress, ZOOM_OUT);
Interpolator fadeInterpolator = config.getInterpolator(ANIM_WORKSPACE_FADE,