Android Не закрывайте AlertDialog после нажатия PositiveButtonAndroid

Форум для тех, кто программирует под Android
Anonymous
Android Не закрывайте AlertDialog после нажатия PositiveButton

Сообщение Anonymous »

Могу ли я просто не закрывать свой AlertDialog после нажатия PositiveButton?

Я хотел бы оставить диалоговое окно, чтобы показать что-то обновленное в моем списке ArrayAdapter ListWords. >

Это мой код.

AlertDialog.Builder sayWindows = new AlertDialog.Builder(MapActivity.this);

final EditText saySomething = new EditText(MapActivity.this);

sayWindows.setPositiveButton("ok",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
say = userName + " Says: "+saySomething.getText();
showPosition.setText(say);
}
});

sayWindows.setNegativeButton("cancel",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});

sayWindows.setAdapter(listWords, null);
sayWindows.setView(saySomething);
sayWindows.create().show();


Подробнее здесь: https://stackoverflow.com/questions/260 ... tivebutton

Вернуться в «Android»