In Android when you pop up a dialog the screen behind it dims. Is there any way to control what that looks like? For example making it dim more or less or using some kind of a pattern?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
This solution did not work for me. There is another option, you can cancel the flag that control dimming. This code worked for me:
Or you can do:
Answering it quite late but I am sure things get deprecated with time so my answer would definitely help someone. First of all create a dialog:
Then get the window of that dialog and add a flag called FLAG_DIM_BEHIND and finally set the dim amount on the screen.
Then show your dialog,
And before you dismiss your dialog, clear the flags:
And then dismiss:
The following parameters worked for me on Android 5.1
params can be assigned to the dialog.
Yes, it is. You can control it.
After creating dialog:
Upd: you can even add blur behind the dialog:
Blurring is deprecated since API14: