[Android] Modal Animation Repeats When Returning from Background - Fix#28522
[Android] Modal Animation Repeats When Returning from Background - Fix#28522kubaflo wants to merge 1 commit intodotnet:mainfrom
Conversation
|
Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
pictos
left a comment
There was a problem hiding this comment.
LGTM,
but thinking loud here... isn't a way to say if the animation happened? If already happened we don't want to trigger it again, I think it will be more robust and possibly cover more scenarios, what do you think?
Yea, initially I thought the same, but I wasn't sure if the animation should trigger only once for an instance of a fragment, or maybe there were some cases where it should trigger again @PureWeen what do you think? |
| dialog.Window.SetLayout(width, height); | ||
|
|
||
| if (IsAnimated) | ||
| if (IsAnimated && !_wasStopped) |
There was a problem hiding this comment.
I can't think of any scenario where the animation should restart after the initial OnStart() call. We can use _pendingAnimation instead of overriding OnStop() and introducing a new flag.
if (IsAnimated && _pendingAnimation)I also think that starting the animation from OnStart() is a poor choice to begin with, as it has led us to introduce flags to handle everything properly.
PureWeen
left a comment
There was a problem hiding this comment.
Let's iterate on this path first
https://github.com/dotnet/maui/tree/modal_window_anim
See if this just naturally works
|
closing in favor of #29557 |
Issues Fixed
Fixes #28492
Screen.Recording.2025-03-19.at.20.33.12.mov
Screen.Recording.2025-03-19.at.20.32.14.mov
What do you think @pictos?