android - onBackpressed DialogFragment -


I have 3 custom dialogs (DialogFragment) not all are canceled because it is necessary that users do not close them can do. The first dialogue is second, and the third third begins. Now I want to come back to the previous dialogue, if I am using backclick. At this time I have two options, but both are not working really well:

  • I start a new one from a dialogue, but never dismissed. -> Then there is always the background of the previous dialogue in the background of the next dialogue

  • I reject, if I start the next dialog, but then he will not do the last Return to the dialog, but close the dialog.

What can I do to start a new dialogue, so, the first view is not visible, but if I click back, then the dialog will appear?

Thanks a lot for help :))

If you go to the third place you can shut the other so you can not see it in the third part.

Later if you need to go back to the second dialogue, you can start it again before closing the third, in the same way you start it when you first switch from second to second Go to the dialog. To override

you need to do something like this:

  dialog.setOnCancelListener (New DialogInterface.OnCancelListener () {DialogInterface dialogue over @Concal (override public null )) {// override code}});  

So the flow of work will be something like this

  1. First Delog -> StartSkandidiag
  2. First Dialogue Discussion
  3. Sectiology -> Start Third Disease
  4. Other Dialog Discontent

And then if you need to go back:

  1. Third Delegation -> StartSecondDialog
  2. thirdDialog.dississ

And so on until you go back to the dialog first.

I hope you understand this, and if not, then please give us some code so that we can assist in more details related to your project.)


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -