Skip to content

Instantly share code, notes, and snippets.

@Velmm
Created December 23, 2017 15:15
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 Velmm/e40010e5032899420873e40ca54031d5 to your computer and use it in GitHub Desktop.
Save Velmm/e40010e5032899420873e40ca54031d5 to your computer and use it in GitHub Desktop.
final Dialog dialog = new Dialog(Custom_chooser.this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
WindowManager.LayoutParams WMLP = dialog.getWindow().getAttributes();
WMLP.gravity = Gravity.CENTER;
dialog.getWindow().setAttributes(WMLP);
dialog.getWindow().setBackgroundDrawable(
new ColorDrawable(android.graphics.Color.TRANSPARENT));
dialog.setCanceledOnTouchOutside(true);
dialog.setContentView(R.layout.about_dialog);
dialog.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment