[inflight/candidate] [Android] Fix ActivityIndicator remaining visible after IsRunning/IsVisible set to false - #37112
Merged
kubaflo merged 1 commit intoAug 5, 2026
Conversation
…isible set to false (#36748) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details - An ActivityIndicator hidden right after page load (IsRunning/IsVisible = false) can stay visibly stuck on screen even though both properties are false. ### Root Cause - The PR #35358 fixed ActivityIndicators not animating after a CollectionView header height change by deferring the ProgressBar visibility write via Post(...), but it captured the visibility as a snapshot when the runnable was queued — due to which a deferred visibility update could run after a later synchronous hide and re-apply its stale (Visible) value, leaving the indicator stuck visible even though IsRunning/IsVisible were false. ### Description of Change - Updated ActivityIndicatorExtensions.UpdateIsRunning to re-read the current visibility state inside the deferred Post() lambda, preventing a previously captured "show" value from incorrectly making a hidden indicator visible again. ### Issues Fixed Fixes #36735 ### Validated the behaviour in the following platforms - [ ] Windows - [x] Android - [ ] iOS - [ ] Mac ### Output | Before | After | |----------|----------| | <video src="https://github.com/user-attachments/assets/b54863bf-c589-4e79-8ae6-9ef87076e70b"> | <video src="https://github.com/user-attachments/assets/0dc0254c-8fa6-4e20-a033-53b7a7da549f"> |
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport of #36748 to inflight/candidate
/cc @kubaflo @SyedAbdulAzeemSF4852