How to set Blur background when dialog create?
I found DialogFragment
only and AlertDialog
but I want to set in Dialog
in activity
How to create it or What's library recommend?
final Dialog dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
Window window = dialog.getWindow();
window.setBackgroundDrawableResource(android.R.color.transparent);
window.setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
dialog.setContentView(R.layout.register_policy_dialog);
try this
or try this you can apply a custom theme to your dialog like this
now create the theme like this
and also check this AlertDialog with Blur background in possition center