Dismissing DialogFragment programmatically

Try using

getDialog().dismiss();

Inside the DialogFragments. So for example you could find the DialogFragment by its tag, like you do so, and then call some method on it that calls this code. I’m usually don’t initiate a dismiss of a DialogFragment from the Activity, my dialog buttons do that for me. But I think that this should also work. I’m not sure how this would affect the fragment backstack tho.

Leave a Comment

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