Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Приклад створення 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(),
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!