androidandroid-studioandroid-fragmentsandroid-dialogfragment

Detect Bottom sheet dialog fragment dismiss on base fragment


I have fragment which contains recycleview with list. in fragment i'm calling another bottom sheet dialog fragment, i Want to know when i dismiss that bottom sheet dialog fragment how to refresh base fragments list.

I Have Tried onpause and onresume method in base fragment. Please help me to solve the issue.


Solution

  • This method trigger when dialog fragment dismissed. To override the method in dialog fragment.

    @Override
    public void onDismiss(@NonNull DialogInterface dialog) {
        super.onDismiss(dialog);
        // use interface to callback method in base fragment
    }