더 많은 사용자 정의 옵션을
alertDialogue.setContentView(/*Layout*/)
를 원하거나 원하는 경우 어떤 선택이 이것을 사용이 경우 사용. 당신이 나에게 그렇게 할 수있는 올바른 방법을 보여줄 수 있도록
alertDialogue.setMultiChoiceItems(R.array.toppings, null,
new DialogInterface.OnMultiChoiceClickListener() {
@Override
public void onClick(DialogInterface dialog, int which,
boolean isChecked) {
if (isChecked) {
// If the user checked the item, add it to the selected items
mSelectedItems.add(which);
} else if (mSelectedItems.contains(which)) {
// Else, if the item is already in the array, remove it
mSelectedItems.remove(Integer.valueOf(which));
}
}
})
체크 빠른 회신에 대한 android guide
덕분에, 나는 사실 onSingleChoiceItems 사용해야합니다? –
값이 하나 인 배열 사용 –
지금 시도해 보겠습니다. –