Forum Xamarin.Forms

Modal ActivityIndicator that disables all elements on the page

Currently, when I implement my ActivityIndicator, it does not block or disable any elements on the page when it is running. It would be nice if it's modal and blocks/disables all elements on the page behind the activity indicator. I don't know why this was never implemented as button as active and user can click on buttons when the viewmodel is busy which is not ideal behavior.

Tagged:

Rejected · Last Updated

Please follow the format for Proposals

Posts

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    I think the solution is to bind the same property you use to visualize the Indicator, to disable (Maybe with a IValueConverter) the other controls...

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @owlstack @AlessandroCaliaro

    Wouldn't it be a lot easier to put up a rg.Plugins.Pop with an an activity indicator on it?
    It can be transparent with an activity indicator in the middle - but will cover the entire page and thus block the user from tapping things.

    Reusable, doesn't have to know what page is below it, doesn't require any change to your current pages.

  • ahmadmadiahmadmadi USMember ✭✭✭

    @ClintStLaurent nice idea but how would he go back to the page he was in before ? in otherwords , when the process is over , how would go back the page that it's viewmodel was busy ?

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    If you take a look to https://github.com/aritchie/userdialogs I think you can find something that can help you like "Loading" method

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @ahmadmadi

    Nobody said anything about navigating away from his page. I said put a pop-up OVER the page. When you have activity (busy) cover the page with a semi-transparent popup. That solves the stated problem of making all the controls on the page inaccessible so the user can't tap buttons and so on. When the activity is done, take the pop up down.

    Since it is a popup covering the page you don't have to wire any of the controls on the page for disabling.

  • ahmadmadiahmadmadi USMember ✭✭✭

    @ClintStLaurent I understood what you meant , but maybe you did not get my point , I was asking , after you pop the page up , how will you remove it and set the focus on the original page. Anyway I checked the API and they have RemovePage so I suppose this can be used.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @ahmadmadi
    Yeah. I wasn't trying to describe how to use the rg.plugins.popup framework. That's already well documented.

This discussion has been closed.