mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
When controlling atomic components, bound to remaining progress
Before, we were just controlling the components as far as we had left, which was fine since they are just a subtle effect anyway. But now that we don't fade out until the very end, this means that long swiping from home usually kept recents in the background during the entire swipe and then abruptly disappear after letting go. Now we make sure the entire atomic animation plays by the time we reach all apps, so recents will fade out in all cases. Bug: 79867407 Change-Id: I7cb6790d9055bc76b4b73ed761604042a308c987
This commit is contained in:
@@ -283,7 +283,9 @@ public abstract class AbstractStateChangeTouchController
|
||||
protected void updateProgress(float fraction) {
|
||||
mCurrentAnimation.setPlayFraction(fraction);
|
||||
if (mAtomicComponentsController != null) {
|
||||
mAtomicComponentsController.setPlayFraction(fraction - mAtomicComponentsStartProgress);
|
||||
// Make sure we don't divide by 0, and have at least a small runway.
|
||||
float start = Math.min(mAtomicComponentsStartProgress, 0.9f);
|
||||
mAtomicComponentsController.setPlayFraction((fraction - start) / (1 - start));
|
||||
}
|
||||
maybeUpdateAtomicAnim(mFromState, mToState, fraction);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user