Skip to content

[inflight/candidate] [Android] Fix ActivityIndicator remaining visible after IsRunning/IsVisible set to false - #37112

Merged
kubaflo merged 1 commit into
inflight/candidatefrom
backport/pr-36748-to-inflight/candidate
Aug 5, 2026
Merged

[inflight/candidate] [Android] Fix ActivityIndicator remaining visible after IsRunning/IsVisible set to false#37112
kubaflo merged 1 commit into
inflight/candidatefrom
backport/pr-36748-to-inflight/candidate

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Backport of #36748 to inflight/candidate

/cc @kubaflo @SyedAbdulAzeemSF4852

…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

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@kubaflo
kubaflo merged commit 5d5b2ba into inflight/candidate Aug 5, 2026
1 of 10 checks passed
@kubaflo
kubaflo deleted the backport/pr-36748-to-inflight/candidate branch August 5, 2026 13:01
@github-actions github-actions Bot added this to the .NET 10 SR10 milestone Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants