AlertDialogue
我使用以下代码创建了一个:
int selectedModeId=0;
public void sortTypeModeSelection(){
AlertDialog.Builder alertBuilder=new AlertDialog.Builder(WatchListDetailActivity.this);
alertBuilder.setSingleChoiceItems(R.array.watchlist_sorting_modes,selectedModeId, new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog, int which) {
switch (which){
case 0:
selectedModeId=0;
break;
case 1:
selectedModeId=1;
break;
case 2:
selectedModeId=2;
break;
case 3:
selectedModeId=3;
break;
case 4:
selectedModeId=4;
break;
case 5:
selectedModeId=5;
break;
case 6:
selectedModeId=6;
break;
case 7:
selectedModeId=7;
break;
}
dialog.cancel();
}
});
alertBuilder.show();
}
我发出了警报,但我想减小对话框列表项的字体大小。我怎样才能做到这一点?
注意:不建议膨胀自定义布局来完成此操作,我想知道是否有另一种方法。