我正在處理具有多個複選框的警報對話框。如何更改複選框列表元素的文本大小? (我可以更改標題的大小和按鈕就好)如何在警報對話框中更改複選框列表的文本大小
boolean[] allBoolean = {true, true, true, true, true, true, true, true};
AlertDialog.Builder prompt = new AlertDialog.Builder(Class.this);
prompt.setTitle("Title");
prompt.setMultiChoiceItems(all, allBoolean, new DialogInterface.OnMultiChoiceClickListener() {
@Override
public void onClick(DialogInterface dialog, int which, boolean isChecked) {
allBoolean[which] = isChecked;
}
});
prompt.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
//do nothing
}
});
prompt.setPositiveButton("Select", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
//do something
}
});
你應該去自定義對話框 – TheLittleNaruto