How can I return from an AlertDialog
which is called and offers more buttons and the user clicks on one of this buttons, then a new AlertDialog
pops up with an input field. So if I check if the user input is eg numeric, how can I return to the AlertDialog
offered before?
I'd suggest using a DialogFragment
from the support library for each of these Dialogs. Just add onClickListeners to each of the buttons of the first DialogFragment
and show the second DialogFragment
in onClick
.
There should not be any necessity for checking if the input is a number if you just set the appropriate input type first.
When the user taps a button on the second DialogFragment
, just call dismiss()
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.