DialogFragment and Activity Dialog. Android

161 Views Asked by At

I'm displaying a Dialog activity and a DialogFragment in Android. The fragment is below activity ( an activity overlaps the fragment. The activity is background). How can I make that the fragment will be foreground?

1

There are 1 best solutions below

2
On

As far I understand situation you described, you have something like that:

  • Activity with attached DialogFragment
  • Dialog Activity displayed from above activity/fragment

If that's correct answer to your question is "call onBackStack() in Dialog Activity", which will cause terminating Dialog Activity and resume DialogFragment (along with its activity or to be more precise - resume activity and DialogFragment that it does have in FragmentManager stack).

I hope this answer will help you.