mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
Fix app open animation when in overview mode.
* Avoids scrim hard line by animating the RecentsViewContainer and AllAppsTransitionController progress. Bug: 79689563 Change-Id: If467e07667ae4d6eeac663608f77bec0eb7ef82f
This commit is contained in:
@@ -21,7 +21,9 @@ import static com.android.launcher3.BaseActivity.INVISIBLE_BY_APP_TRANSITIONS;
|
||||
import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
|
||||
import static com.android.launcher3.LauncherState.ALL_APPS;
|
||||
import static com.android.launcher3.LauncherState.NORMAL;
|
||||
import static com.android.launcher3.LauncherState.OVERVIEW;
|
||||
import static com.android.launcher3.Utilities.postAsyncCallback;
|
||||
import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS_PROGRESS;
|
||||
import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE;
|
||||
import static com.android.launcher3.anim.Interpolators.DEACCEL_1_7;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
@@ -58,6 +60,7 @@ import android.view.ViewGroup;
|
||||
|
||||
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
|
||||
import com.android.launcher3.InsettableFrameLayout.LayoutParams;
|
||||
import com.android.launcher3.allapps.AllAppsTransitionController;
|
||||
import com.android.launcher3.anim.AnimatorPlaybackController;
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.dragndrop.DragLayer;
|
||||
@@ -329,6 +332,30 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
|
||||
appsView.setTranslationY(startY);
|
||||
appsView.setLayerType(View.LAYER_TYPE_NONE, null);
|
||||
};
|
||||
} else if (mLauncher.isInState(OVERVIEW)) {
|
||||
AllAppsTransitionController allAppsController = mLauncher.getAllAppsController();
|
||||
launcherAnimator.play(ObjectAnimator.ofFloat(allAppsController, ALL_APPS_PROGRESS,
|
||||
allAppsController.getProgress(), ALL_APPS_PROGRESS_OFF_SCREEN));
|
||||
|
||||
View overview = mLauncher.getOverviewPanelContainer();
|
||||
ObjectAnimator alpha = ObjectAnimator.ofFloat(overview, View.ALPHA, alphas);
|
||||
alpha.setDuration(217);
|
||||
alpha.setInterpolator(LINEAR);
|
||||
launcherAnimator.play(alpha);
|
||||
|
||||
ObjectAnimator transY = ObjectAnimator.ofFloat(overview, View.TRANSLATION_Y, trans);
|
||||
transY.setInterpolator(AGGRESSIVE_EASE);
|
||||
transY.setDuration(350);
|
||||
launcherAnimator.play(transY);
|
||||
|
||||
overview.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
|
||||
endListener = () -> {
|
||||
overview.setLayerType(View.LAYER_TYPE_NONE, null);
|
||||
overview.setAlpha(1f);
|
||||
overview.setTranslationY(0f);
|
||||
mLauncher.getStateManager().reapplyState();
|
||||
};
|
||||
} else {
|
||||
mDragLayerAlpha.setValue(alphas[0]);
|
||||
ObjectAnimator alpha =
|
||||
|
||||
Reference in New Issue
Block a user