Remove extra grid interpolator in TaskView
- Currently in App -> Overview animation, current task is undergo ACCELERATE_DECELERATE interpolator twice, one via interpolating GRID_PROGRESS in AbsSwipeUpHandler, one via TaskView.getGridTrans - I got rid of TaskView.getGridTrans's interpolator, and completely rely on AbsSwipeUpHandler or BaseRecentsViewStateController to apply the interpolator - Refactored BaseRecentsViewStateController to consistenly apply ACCELERATE_DECELERATE for QUICK_SWITCH_FROM_HOME -> Overview animation, and otherwise it should use INSTNAT/FINAL_FRAME Bug: 318352235 Flag: None Test: Default/3P Launcher X home/qs_from_home/app -> Overview and Overview to home Change-Id: I21ca903897f8c374e136c0ac27cec76dd3f5c1f3
This commit is contained in:
1 parent
82d88d3fdc
commit
1f2b23dd13
3 files changed
+20
-18
No files matched your search
+11
-8
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.launcher3.uioverrides;
|
||||
|
||||
import static com.android.app.animation.Interpolators.ACCELERATE_DECELERATE;
|
||||
import static com.android.app.animation.Interpolators.AGGRESSIVE_EASE_IN_OUT;
|
||||
import static com.android.app.animation.Interpolators.FINAL_FRAME;
|
||||
import static com.android.app.animation.Interpolators.INSTANT;
|
||||
@@ -132,15 +133,17 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
|
||||
LauncherState fromState = mLauncher.getStateManager().getState();
|
||||
setter.setFloat(mRecentsView, TASK_THUMBNAIL_SPLASH_ALPHA,
|
||||
toState.showTaskThumbnailSplash() ? 1f : 0f,
|
||||
!toState.showTaskThumbnailSplash() && fromState == QUICK_SWITCH_FROM_HOME
|
||||
? LINEAR : INSTANT);
|
||||
getOverviewInterpolator(fromState, toState));
|
||||
|
||||
boolean showAsGrid = toState.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile());
|
||||
Interpolator gridProgressInterpolator = showAsGrid
|
||||
? fromState == QUICK_SWITCH_FROM_HOME ? LINEAR : INSTANT
|
||||
: FINAL_FRAME;
|
||||
setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS, showAsGrid ? 1f : 0f,
|
||||
gridProgressInterpolator);
|
||||
setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS,
|
||||
toState.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()) ? 1f : 0f,
|
||||
getOverviewInterpolator(fromState, toState));
|
||||
}
|
||||
|
||||
private Interpolator getOverviewInterpolator(LauncherState fromState, LauncherState toState) {
|
||||
return fromState == QUICK_SWITCH_FROM_HOME
|
||||
? ACCELERATE_DECELERATE
|
||||
: toState.overviewUi ? INSTANT : FINAL_FRAME;
|
||||
}
|
||||
|
||||
abstract FloatProperty getTaskModalnessProperty();
|
||||
|
||||
Reference in new issue
Block a user