I want to remove the black background on custom dialog as shown in the picture. I\'m sure the black background was from the dialog, not from app\'s background.
Sonehow getWindow().setBackgroundDrawable()
didn't work for me with AlertDialog
. I found an easier solution using Dialog. Here's my code -
final Dialog dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
dialog.setContentView(R.layout.popup_window);
dialog.show();