LightBox Effect for Android Dialogs

The stock black rectangular progress dialogs on Android are ugly, so I created a simple little open-source alternative.

It works by placing a translucent overlay on the Android UI with a ProgressBar and a dialog message. There’s also an alpha animation in there, to really class it up.


To use it, just add the lightbox_dialog.xml file to your res/layout folder. Then add the styles.xml and colors.xml to your res/values folder.

Then, just define these methods and dialog somewhere in an Activity base class:

private Dialog busyDialog;

public void showBusyDialog(String message) {
    busyDialog = new Dialog(this,;

public void dismissBusyDialog() {
    if (busyDialog != null)

    busyDialog = null;

And that’s it! Source code lives on GitHub here.

About this entry