Merge "Fix bug where shape reveal progress gets started too early." into ub-launcher3-qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1dbec0ef43
+2
-4
@@ -1135,12 +1135,10 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
|
||||
// FolderIconView can be seen morphing into the icon shape.
|
||||
final float windowAlphaThreshold = isFloatingIconView ? 1f - SHAPE_PROGRESS_DURATION : 1f;
|
||||
anim.addOnUpdateListener((currentRect, progress) -> {
|
||||
float interpolatedProgress = Interpolators.ACCEL_1_5.getInterpolation(progress);
|
||||
|
||||
homeAnim.setPlayFraction(progress);
|
||||
|
||||
float windowAlpha = Utilities.mapToRange(interpolatedProgress, 0,
|
||||
windowAlphaThreshold, 1f, 0f, Interpolators.LINEAR);
|
||||
float windowAlpha = Math.max(0, Utilities.mapToRange(progress, 0,
|
||||
windowAlphaThreshold, 1f, 0f, Interpolators.LINEAR));
|
||||
mTransformParams.setProgress(progress)
|
||||
.setCurrentRectAndTargetAlpha(currentRect, windowAlpha);
|
||||
mClipAnimationHelper.applyTransform(targetSet, mTransformParams,
|
||||
|
||||
@@ -229,7 +229,7 @@ public class FloatingIconView extends View implements
|
||||
|
||||
mTaskCornerRadius = cornerRadius / scale;
|
||||
if (mIsAdaptiveIcon) {
|
||||
if (!isOpening && shapeRevealProgress >= 0) {
|
||||
if (!isOpening && progress >= shapeProgressStart) {
|
||||
if (mRevealAnimator == null) {
|
||||
mRevealAnimator = (ValueAnimator) IconShape.getShape().createRevealAnimator(
|
||||
this, mStartRevealRect, mOutline, mTaskCornerRadius, !isOpening);
|
||||
|
||||
Reference in New Issue
Block a user