Search code examples
androidandroid-alertdialog

Android 14 outside of AlertDialog doesn't get dim


On Android 14 Upside-down cake emulator, when showing an alert dialog, outside of alert dialog doesn't get dim. How can I get dim just like other android versions?

enter image description here

enter image description here

I tried:

alertDialog.window?.setDimAmount(0.7f)

But only Android 14 doesn't work. Thank you.


Solution

  • I have same problem on emulator.But when i switch on disable HW overlays in develop options ,the dim shows again , and i don't know why.

    I guess it is emulator cause the problem. I tested the real device and the emulator, only the emulator does not show dim.

    Same problem on issue tracker

    https://issuetracker.google.com/issues/289117017