Akash Agrawal
Akash Agrawal

Reputation: 73

ActivityIndicator disable controls?

I want to have an ActivityIndicator that covers all controls, so the user cant click twice on the buttons. He have to wait for the loading to finish. For example, a login page in an app.

It could be something similar to this example on iOS http://developer.xamarin.com/recipes/ios/standard_controls/popovers/display_a_loading_message/

Thanks.

Upvotes: 0

Views: 1908

Answers (2)

Rohit Vipin Mathews
Rohit Vipin Mathews

Reputation: 11787

I haven't tried this. But I might in a couple of days. But in the meantime I can give you my idea. There is the absolute layout which you can make use of. Create a base page which is inherited by all your content pages and in the base page create the activity indicator with absolute position above. So all other controls falls under it. You can use the isbusy flag to notify property changes so that activity indicator is displayed and when the action is over set the flag to false and which in Turn will hide the activity indicator. I had seen a sample somewhere which I will try digging up for reference. Probably in git.

For Reference

Upvotes: 0

Andy Hopper
Andy Hopper

Reputation: 3678

I'd recommend taking a look at Allan Ritchie's ACR Xamarin Forms library (available as a NuGet package). It has a Loading indicator that displays "above" the form and prevents clicking the underlying form elements.

Upvotes: 1

Related Questions