ProgressDialog without dimmed screen in Android

Home » Programming » ProgressDialog without dimmed screen in Android

ProgressDialog without dimmed screen in Android

ProgressDialog

Android’s ProgressDialog is a progress indicator to show progress to the user action. The ProgressDialog shows a loader and user friendly message. It dims the entire screen which focuses the loader and message.

There are cases where the gray background looks annoyed with the design so it needs to be removed. It is easy to remove the dimmed screen and maintain functionality of ProgressDialog.

Passing the parameter 0 to the constructor of the ProgressDialog as the style does not work. An object needs to be created to remove the offending flag manually.

Check the example below to get a clear idea.

Step 1 : MainActivity.java

 

Step 2 : Remove the dimmed screen

 

Step 3 : Progress Dialog to appear near the bottom, controlled by the float value.

Output

 ProgressDialog

I’m a positive and enthusiastic web and mobile developer – and I relish a challenge.