Android Application Development (AND-401) — Question 48

What does the following code do?
dialog.getWindow().setFlags(LayoutParams.FLAG_BLUR_BEHIND,
LayoutParams.FLAG_BLUR_BEHIND);

Answer options

Correct answer: A

Explanation

The correct answer is A because the code sets the FLAG_BLUR_BEHIND, which causes the activity behind the dialog to appear blurred when the dialog is shown. Option B is incorrect as it refers to dimming, which is not what this flag does. Option C is not relevant to the code's functionality, and Option D inaccurately describes the visual effect, as it applies a blur to the entire background rather than just the edges of the dialog.