AlertDialog.Builder builder = new AlertDialog.Builder(context); ... ... AlertDialog dialog = builder.create(); ColorDrawable back = new ColorDrawable(Color.TRANSPARENT); InsetDrawable inset = new InsetDrawable(back, 20); dialog.getWindow().setBackgroundDrawable(inset); dialog.show();
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter