mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Update animations for phones: Overview > OverviewSplitSelect transition
This change updates the animation for initiating a split from the Overview screen on phones. Includes new timings and interpolators, and extends timing data classes related to SplitAnimationTimings. Fixes a noticeable issue where the split animation appeared slow on phones. Outstanding issues (fixes in progress): - Repeated invocations of split on phones cause an erroneous animation to play. (b/249154347) - Thumbnail corners do not match placeholder corners; the transition between the two is slightly janky. (b/236761794) - Placeholder icons should be 72dp. (b/236761794) Bug: 236761794 Test: Manual Change-Id: Ibb97ef54498b0aa9556df531d8084799259c06e2
This commit is contained in:
@@ -42,6 +42,8 @@ import com.android.launcher3.anim.PropertySetter;
|
||||
import com.android.launcher3.states.StateAnimationConfig;
|
||||
import com.android.launcher3.touch.PagedOrientationHandler;
|
||||
import com.android.launcher3.util.MultiValueAlpha;
|
||||
import com.android.quickstep.util.AnimUtils;
|
||||
import com.android.quickstep.util.SplitAnimationTimings;
|
||||
import com.android.quickstep.views.ClearAllButton;
|
||||
import com.android.quickstep.views.LauncherRecentsView;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
@@ -123,12 +125,18 @@ public final class RecentsViewStateController extends
|
||||
TASK_PRIMARY_SPLIT_TRANSLATION, TASK_SECONDARY_SPLIT_TRANSLATION,
|
||||
mLauncher.getDeviceProfile());
|
||||
|
||||
SplitAnimationTimings timings =
|
||||
AnimUtils.getDeviceOverviewToSplitTimings(mLauncher.getDeviceProfile().isTablet);
|
||||
|
||||
mRecentsView.createSplitSelectInitAnimation(builder,
|
||||
toState.getTransitionDuration(mLauncher, true /* isToState */));
|
||||
// Add properties to shift remaining taskViews to get out of placeholder view
|
||||
builder.setFloat(mRecentsView, taskViewsFloat.first,
|
||||
toState.getSplitSelectTranslation(mLauncher), LINEAR);
|
||||
builder.setFloat(mRecentsView, taskViewsFloat.second, 0, LINEAR);
|
||||
toState.getSplitSelectTranslation(mLauncher),
|
||||
timings.getGridSlidePrimaryInterpolator());
|
||||
builder.setFloat(mRecentsView, taskViewsFloat.second,
|
||||
0,
|
||||
timings.getGridSlideSecondaryInterpolator());
|
||||
|
||||
if (!animate) {
|
||||
AnimatorSet as = builder.buildAnim();
|
||||
|
||||
Reference in New Issue
Block a user