You can use the android:backgroundDimAmount
attribute (range: 1.0 - 0.0
):
<style name="ThemeOverlay.App.MaterialAlertDialog" parent="ThemeOverlay.Material3.MaterialAlertDialog">
<item name="android:backgroundDimAmount">0.3</item>
</style>
or if you are using a MaterialComponents theme
<style name="ThemeOverlay.App.MaterialAlertDialog" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
<item name="android:backgroundDimAmount">0.xx</item>
</style>
and then just call:
MaterialAlertDialogBuilder(context, R.style.ThemeOverlay_App_MaterialAlertDialog)
//....
.show()
With 0.2
:

With 0.8
:
