Use FlingOnBackAnimationCallback for predictive back
Use FlingOnBackAnimationCallback to get automatically interpolated progress and out-of-the-box support for back gesture flings. Bug: 362938401 Test: Manual, i.e. testing launcher predictive back cases (all apps, widget-picker) Flag: com.android.window.flags.predictive_back_timestamp_api Change-Id: I35806dbf005eb6fce97327d26c1e75bca60c2c77
This commit is contained in:
1 parent
d626cdd727
commit
600c1af779
4 files changed
+14
-15
No files matched your search
@@ -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