Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaartenS/07affc8ea85ce36bb324 to your computer and use it in GitHub Desktop.
Save MaartenS/07affc8ea85ce36bb324 to your computer and use it in GitHub Desktop.

Remove the background shade and dialog background from an Android Dialog

final Dialog dialog = new Dialog(context);
        dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
        dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
        dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
        dialog.setContentView(R.layout.overlay_loading);
        dialog.setCancelable(false);
        dialog.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment