0

Here is a line of code that I have:

public class ReminderHandler()  {
  if (edittext.containsReminderWords()){
  test.setText("Do you want me to remind you to " + sharedPref.getString(toremember, toremember) + "?");
    }
}

I want the program to wait for either a yes or a no answer from the edittext after this specific line of command.

I have no idea how though.

How can I achieve this?

4

3 回答 3

2

你最好使用AlertDialog。检查此链接以了解有关 android 对话框的更多信息

于 2013-06-17T16:19:45.247 回答
1

JOptionPane 有很多选项供您使用。

JOptionPane.showConfirmDialog(null, "Do you want to do something?")

有关文档,请参见此处

于 2013-06-17T16:45:38.920 回答
0

你可以通过一个事件来做到这一点:

于 2013-06-17T16:18:55.120 回答