0

如何从一个AlertDialog被调用并提供更多按钮并且用户单击其中一个按钮时返回,然后AlertDialog弹出一个带有输入字段的新按钮。因此,如果我检查用户输入是否是例如数字,我该如何返回AlertDialog之前提供的内容?

4

1 回答 1

0

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().

于 2013-07-25T10:02:45.770 回答