Description
Description
The ActivityIndicator
behaves differently on iOS compared to Android.
On Android, both IsRunning
and IsVisible
must be true
for the indicator to be shown and animated. Otherwise, it remains hidden.
On iOS, the behavior is inconsistent:
Initial State | Change Applied | Expected Result | Actual Result | ✅ / ❌ |
---|---|---|---|---|
IsRunning = false , IsVisible = false |
Set IsRunning = true |
Not visible | Visible | ❌ |
IsRunning = false , IsVisible = false |
Set IsVisible = true |
Not visible | Not visible | ✅ |
IsRunning = true , IsVisible = true |
Set IsRunning = false |
Not visible | Not visible | ✅ |
IsRunning = true , IsVisible = true |
Set IsVisible = false |
Not visible | Not visible | ✅ |
There should be a unified behavior where a change in either IsRunning
or IsVisible
triggers a check of both properties. The indicator should only be shown if both IsRunning
and IsVisible
are true
.
I discovered this issue because the indicator remains rendered in my app even when IsVisible
is set to false
. In my case, a 1dp-sized ActivityIndicator
blinks in the top-left corner of the layout after transitioning from IsRunning = true
, IsVisible = true
to IsVisible = false
. I believe this could be addressed by properly synchronizing the visibility logic.
This behavior started after updating MAUI from 9.0.40 to 9.0.60 (I had to skip 9.0.50 due to a bug in CommunityToolkit dialogs that broke my app’s login flow).
iOS recording
Setting only IsRunning = true on iOS causes the ActivityIndicator to become visible, ignoring the value of IsVisible. This contradicts expected behavior and differs from Android, where both IsRunning and IsVisible must be true for the indicator to appear.
Steps to Reproduce
- Create a new MAUI 9 app
- Add to MainPage a new ActivityIndicator (IsRunning false, IsVisible false)
- Set the IsRunning for ActivityIndicator to true (this should not work)
Link to public reproduction project repository
https://github.com/Domik234/Issue-MauiActivityIndicatorBehavior-iOS
Version with bug
9.0.60 SR6
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
9.0.40 SR4
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
Setting both properties should be enough. (IsRunning and IsVisible values should be always the same for proper behavior)