Додати до Chrome
✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Приклад створення AlertDialog із списком вибираних пунктів,:
@Overridepublic void onClick (DialogInterface dialog, int id) });CharSequence [] colors {"Red", "Green", "Blue"};builder.setItems (colors, new DialogInterface.OnClickListener()
CharSequence [] colors {"Red", "Green", "Blue"};builder.setItems (colors, new DialogInterface.OnClickListener()public class MyActivity extends Activity {@Override}
CharSequence []{"Red", "Green", "Blue"};builder (colors, new DialogInterface.OnClickListener()AlertDialogButtonActivity.this.finish();builder.setNegativeButton ("No", new DialogInterface.OnClickListener()colors {"Red", "Green", "Blue"};builder.setItems (colors, new DialogInterface.OnClickListener()
"Color : + mColors [ item], Toast.LENGTH SHORT ).show();builder.setPositiveButton ("Yes", new DialogInterface.OnClickListener()public void onClick (DialogInterface dialog, int id) });AlertDialogButtonActivity.this.finish();builder.setNegativeButton ("No", new DialogInterface.OnClickListener()public void onCl ick (DialogInterface dialog, int id) dialog.cancel();
CharSequence [] colors {"Red", "Green", "Blue"};builder.setItems (colors, new DialogInterface.OnClickListener()public void onClick ( DialogInterface dialog, int item) // обробляємо подію вибору елементу спискуToast.makeText (getApplicationContext(),
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!