Skip to content
Commit cc0a34b5 authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz
Browse files

Use immutable shouldBeAnimated during Unfold Animation

Context:
We decide to run animations by using shouldBeAnimated lambda function. It represents mutable state which is combination of the
StatusBar and some external business logic.

It shows that shouldBeAnimated value may change for some reasons after the animation is fired.
This may cause some visual issues like wrong translationX values in the view(animation started but not completed properly).

Solution:
We make shouldBeAnimated immutable variable instead of lambda func in ViewToTranslate and use it during the animation.
We already map `ViewIdToTranslate` to `ViewToTranslate` on each animation start.  It also verifies that we invalidate the preserved value on each animation start.

Test: atest UnfoldConstantTranslateAnimatorTest
Bug: 264454435

Change-Id: I75f84a668ab3395193901cff569ca56e55456316
parent 99dc404b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment