BottomSheetDialogFragment accepts only dipAmount of 1.0f (non-transparent black background), 0.99f and less are fully transparent background, this seems to be affecting only API 33+. Styles.xml attributes not working too. What should i do to set background dim to standart 0.32f?
I've tried setting attributes
<item name="android:backgroundDimEnabled">true</item>
<item name="android:backgroundDimAmount">0.3</item>
Not worked. Then in code
requireDialog().window?.apply {
addFlags(FLAG_DIM_BEHIND)
val lp = attributes
lp?.dimAmount = 0.32f
attributes = lp
setDimAmount(0.99f)
}
It's still absolutely transparent. But if i'll change to
setDimAmount(1.0f)
then BottomSheetDialogFragment's background will be absolutely black.
Possible, temporary solution: