Reset opacity when view is being reused #22820
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
The DrawerLayout currently recreates its details view whenever it's navigated back to. In the case where you are nesting a FlyoutPage inside a NavigationPage, this causes a double animation to occur which leaves the opacity of the view set to zero. When android is processing an animation it sets the alpha of a view to zero
And then when it's done it sets it back to 1, the problem we're hitting is that the second animation is starting before the first one finishes, so, the second animation thinks it needs to use "0" as the "initial" alpha value.
Ideally, we will fix DrawerLayout to just reuse its view opposed to creating a new one but that's going to take a bit more of an effort, so, this should get us through until that can be reworked.
Issues Fixed
Fixes #19955