Preventing the back button from cancelling a DialogFragment

How about using setCancelable? Did you try it?

From the Docs:

Control whether the shown Dialog is cancelable. Use this instead of
directly calling Dialog.setCancelable(boolean), because DialogFragment
needs to change its behavior based on this

For custom DialogFragment

Add isCancelable = false at onCreateDialog

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)