Small ProgressDialog "spinner" for Android

I was able to use the standard "ProgressDialog" for Android to show that an undefined task was running. alt text

But I would like to use the "smaller" spinner progress dialog, which was used for undefined tasks in some standard Android applications, such as the Android market (there is a small spinning circle that is actually integrated into the application window (on the contrary, it floats on top of it ) alt text

Does anyone know how to create a little dialogue of progress (or can someone point me in the right direction)?

+4
source share
3 answers

The Activity class has a built-in ProgressBar in the Title area, which can be used for this purpose. Is that what you are talking about?

I assume that somewhere else you see this, except in the title bar, there will just be a ProgressBar user interface widget set to undefined placed in the view.

+7
source

Try using the ProgressBar and add it to LinearLayout as follows:

ProgressBar mSpinner = new ProgressBar (this); mSpinner.setLayoutParams (new LayoutParams (LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT))

mSpinner.setIndeterminate (true); lyt.addView (mSpinner);

+1
source

Use the built-in Adnroid widget called ProgressBar. put it on the xml layout. and set the visibility to visible and invisible according to your requirement

-3
source

Source: https://habr.com/ru/post/1300331/


All Articles