Merge "Use FlingOnBackAnimationCallback for predictive back" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
f47df1f60a
@@ -43,7 +43,6 @@ import android.view.animation.Interpolator;
|
||||
import androidx.annotation.FloatRange;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.app.animation.Interpolators;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
|
||||
import com.android.launcher3.Launcher;
|
||||
@@ -277,10 +276,9 @@ public class AllAppsTransitionController
|
||||
return;
|
||||
}
|
||||
|
||||
float deceleratedProgress = Interpolators.BACK_GESTURE.getInterpolation(backProgress);
|
||||
float scaleProgress = ScrollableLayoutManager.PREDICTIVE_BACK_MIN_SCALE
|
||||
+ (1 - ScrollableLayoutManager.PREDICTIVE_BACK_MIN_SCALE)
|
||||
* (1 - deceleratedProgress);
|
||||
* (1 - backProgress);
|
||||
|
||||
mAllAppScale.updateValue(scaleProgress);
|
||||
}
|
||||
|
||||
@@ -298,8 +298,7 @@ public abstract class AbstractSlideInView<T extends Context & ActivityContext>
|
||||
@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
|
||||
public void onBackProgressed(BackEvent backEvent) {
|
||||
final float progress = backEvent.getProgress();
|
||||
float deceleratedProgress = Interpolators.BACK_GESTURE.getInterpolation(progress);
|
||||
mSwipeToDismissProgress.updateValue(deceleratedProgress);
|
||||
mSwipeToDismissProgress.updateValue(progress);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user