To create the dialog, I’m overriding the following method:
protected Dialog onCreateDialog(final int dialogId) {
}
and to call this, I’m using:
showDialog(id);
But now I want to use FragmentDialog, but there is no method like:
protected Dialog onCreateDialog(final int dialogId) {
}
It has
Dialog onCreateDialog(Bundle savedInstanceState){}
My question is, how can I show dialogs based on different id’s in FragmentDialog.
I guess by
FragmentDialogyou mean showing Dialogs inside a Fragment and NOT a DialogFragmentBut you can replicate this behavior inside a Fragment Like this:
it is just a simple caching of Dialogs
EDIT: Original Source from Activity: