Advertisement
Orleon

Untitled

Dec 7th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.08 KB | None | 0 0
  1. builder.setTitle("Выберите ингредиенты для пиццы")
  2.                 .setCancelable(false)
  3.                 .setIcon(R.drawable.pizza)
  4.                 .setMultiChoiceItems(mIngredients, null, new DialogInterface.OnMultiChoiceClickListener() {
  5.                     @Override
  6.                     public void onClick(DialogInterface dialog, int which, boolean isChecked) {
  7.                         mSelectedIngredients[which] = isChecked;
  8.                     }
  9.                 })
  10.                 .setPositiveButton("ОК",
  11.                         new DialogInterface.OnClickListener() {
  12.                             public void onClick(DialogInterface dialog, int id) {
  13.                                 finish();
  14.                             }
  15.                         })
  16.                 .setNegativeButton("Отмена",
  17.                         new DialogInterface.OnClickListener() {
  18.                             public void onClick(DialogInterface dialog, int id) {
  19.                                 dialog.cancel();
  20.                             }
  21.                         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement