Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display a Dialog with progress spinner?

How to display a AlertDialog with a progressbar spinner?

When a button is pressed i want it to block the UI until the data is finished loading displaying a spinner and a message and title.

i know i will need to use an asyncTask for this but how do i go about displaying the dialog with progressbar spinner?

like image 685
coder_For_Life22 Avatar asked Jan 26 '26 06:01

coder_For_Life22


1 Answers

This should be all you need

ProgressDialog progressDialog = ProgressDialog.show(YourClassName.this, "", "Please wait");

Hope this helps

like image 132
Boardy Avatar answered Jan 27 '26 22:01

Boardy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!