Migrate Interpolators from Launcher3 to the public animation library
Test: atest Bug: 271850966 Change-Id: Iba999f2e753764a37d35e508e707df02388432e9
This commit is contained in:
1 parent
5644e3f1fd
commit
7120373bbc
95 files changed
+278
-513
No files matched your search
@@ -18,8 +18,8 @@ package com.android.launcher3;
|
||||
|
||||
import static android.animation.ValueAnimator.areAnimatorsEnabled;
|
||||
|
||||
import static com.android.app.animation.Interpolators.DECELERATE_1_5;
|
||||
import static com.android.launcher3.LauncherState.EDIT_MODE;
|
||||
import static com.android.launcher3.anim.Interpolators.DEACCEL_1_5;
|
||||
import static com.android.launcher3.dragndrop.DraggableView.DRAGGABLE_ICON;
|
||||
import static com.android.launcher3.icons.IconNormalizer.ICON_VISIBLE_AREA_FACTOR;
|
||||
import static com.android.launcher3.util.MultiTranslateDelegate.INDEX_REORDER_BOUNCE_OFFSET;
|
||||
@@ -60,9 +60,9 @@ import androidx.annotation.IntDef;
|
||||
import androidx.core.graphics.ColorUtils;
|
||||
import androidx.core.view.ViewCompat;
|
||||
|
||||
import com.android.app.animation.Interpolators;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.accessibility.DragAndDropAccessibilityDelegate;
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.celllayout.CellLayoutLayoutParams;
|
||||
import com.android.launcher3.celllayout.CellPosMapper.CellPos;
|
||||
import com.android.launcher3.celllayout.ReorderAlgorithm;
|
||||
@@ -272,7 +272,7 @@ public class CellLayout extends ViewGroup {
|
||||
mReorderPreviewAnimationMagnitude = (REORDER_PREVIEW_MAGNITUDE * deviceProfile.iconSizePx);
|
||||
|
||||
// Initialize the data structures used for the drag visualization.
|
||||
mEaseOutInterpolator = Interpolators.DEACCEL_2_5; // Quint ease out
|
||||
mEaseOutInterpolator = Interpolators.DECELERATE_QUINT; // Quint ease out
|
||||
mDragCell[0] = mDragCell[1] = -1;
|
||||
mDragCellSpan[0] = mDragCellSpan[1] = -1;
|
||||
for (int i = 0; i < mDragOutlines.length; i++) {
|
||||
@@ -1606,7 +1606,7 @@ public class CellLayout extends ViewGroup {
|
||||
ValueAnimator va = ObjectAnimator.ofFloat(this, ANIMATION_PROGRESS,
|
||||
animationProgress, 0);
|
||||
a = va;
|
||||
a.setInterpolator(DEACCEL_1_5);
|
||||
a.setInterpolator(DECELERATE_1_5);
|
||||
a.setDuration(REORDER_ANIMATION_DURATION);
|
||||
a.start();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user