Substitute for the Progressdialog

Asked

Viewed 4,540 times

2

In my apps I used Progress Dialog however I read that it is depreciated from the O API .

According to this link

I wanted to know which component can be a substitute for it, because I used it as follows.

progressDialog = ProgressDialog.show(this, "Aguarde.",
            "Processando..!", true);

And in a certain part of the code where I would know that it had already been processed, I would put

progressDialog.dismiss();

I was reading about Progress Bar but she doesn’t work that way or work?

1 answer

3


I was wondering which component could be his replacement (...).

The suggested replacement is Progressbar. Both, Progressdialog and Progressbar, exist since the initial version of Android.

I was reading about Progress Bar but she doesn’t work that way or work?

Yes, it refers to the possibility of starting and stopping it. The difference is that one is a dialog while the other is displayed "inside" the layout.


The Progressdialog was considered obsolete in Android O(Api Level 26) which, on this date, is the latest version. The fact that it was considered obsolete does not imply that it cannot use it.

The main reason, in my view, for Progressdialog to be considered obsolete, has to do with the user experience - the presentation of a dialog limits user interaction with the application while the task is running.

See the question Best practices when presenting Android loading screen, where the Luiz Vieira, in his reply, addresses the issue from the perspective of "usability".
In my reply, to the above question, find an example of the use of Progressbar.

  • good guy, helped me a lot here. I used the progressbar.setVisibility(View.VISIBLE) and when loading the procedure I used the progressbar.setVisibility(View.INVISIBLE). Thank you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.