Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Global ActivityIndicator, like an Overlay

Hey everyone, I'm working in a project which I need to call a lot of RESTful services, and every time I do it I have to use an ActivityIndicator for showing to the user that some work is getting done.

The problem is that my project has many pages, and I'm repeating A LOT of code for this. I'm using Prism and adding the properties to the ViewModelBase, but I still repeat a lot of features for working with the ActivityIndicator (like setting the AbsoluteLayout in the XAML).

What I want to implement is an overlay that is going to cover the whole application, and when I want to start the ActivityIndicator I'll just start it calling a service that I can use it in every page, without adding properties to the ViewModel or adding an AbsoluteLayout to the XAML. Of course I have no idea of how to do it, that's why I'm asking if someone has any idea.

I took this idea from a React Native project a friend of mine was working, and I thought it'd be really useful. I hope someone can help me with it.

Best Answer


Sign In or Register to comment.