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.
Use below two code lines. Tested as well.
getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);