Answers for "dialog background dimming in android"

1

dialog background dimming in android

Window window = dialog.getWindow();
if(window != null){
   window.addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); // This flag is required to set otherwise the setDimAmount method will not show any effect
   window.setDimAmount(0.5f); //0 for no dim to 1 for full dim
}
Posted by: Guest on July-14-2021

Code answers related to "dialog background dimming in android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language