StatusBar unfold transition: reset translations when rotating
When rotating the screen scoped status bar unfold transition provider stops the animation and invokes onTransitionFinished callback but the translations of the views are not cleared. It led to incorrect translations of the status bar icons after rotating the screen during the animation. Bug: 201518277 Test: rotate the phone during unfold animation Change-Id: I3bcd48f73e43133e3d53c7ba9f25e9618a037d4c
This commit is contained in:
@@ -63,5 +63,11 @@ class StatusBarMoveFromCenterAnimationController @Inject constructor(
|
||||
override fun onTransitionProgress(progress: Float) {
|
||||
moveFromCenterAnimator?.onTransitionProgress(progress)
|
||||
}
|
||||
|
||||
override fun onTransitionFinished() {
|
||||
// Reset translations when transition is stopped/cancelled
|
||||
// (e.g. the transition could be cancelled mid-way when rotating the screen)
|
||||
moveFromCenterAnimator?.onTransitionProgress(1f)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user