Bye-Bye Progress Dialog, Hello Alert Dialog

Step 1. Create a custom layout:

You can use any progress indicator or create on your own and design it accordingly. Here I am using the Progress bar provided by material design. So a sample custom progress layout looks like below:

Step 2. Create a generic alert dialog creator:

Here I am creating this generic creator so that you can use this to create different types of progress dialog for different locations or even other kinds of dialogs.

Step 3. Create the Progress dialog:

Passing correct arguments to the above method, we can create the progress bar function and then can set the text.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store