How do you control the height of the buttons on an Alert Dialog in Android?
I have the following code. How can I make the Neutral Button twice as tall, or Just 开发者_StackOverflowset it's height for that matter. Right now it's too thin and the users are having trouble clicking on it. I don't want to roll my own dialog if I can help it.
int SizeIndex = CurrentState.BaseItem.Sub.indexOf(CurrentState.BaseItem.GetDefaultSize());
CharSequence[] csItems = CurrentState.BaseItem.subNamesToArray();
new AlertDialog.Builder(CurrentState.Activity)
.setIcon(R.drawable.icon)
.setTitle(R.string.prompt_SelectSize)
.setSingleChoiceItems(csItems,SizeIndex, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
CurrentState.SelectedSize = (ItemSize) CurrentState.BaseItem.Sub.get(which);
}
})
.setNeutralButton(R.string.alert_dialog_Done, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
if(CurrentState.SelectedSize == null)
{
CurrentState.SelectedSize = CurrentState.BaseItem.GetDefaultSize();
}
CurrentState.Next();
dialog.cancel();
}
})
.show();
精彩评论