appcompat library v7:27.0.1
当有可滚动的消息时,当使用3个按钮时,对话框构建器中的按钮也变为可滚动
示例如下
public void mesg(){
final Context c = this;
final AlertDialog d = new AlertDialog.Builder(c)
.setIcon(R.mipmap.ic_launcher)
//.setCancelable(false) // Cant Be Cancel By Pressing Back Key Only By Pressing Positive Button
.setTitle("Test title") // Can Also Be Done By HTML Style
.setMessage("test message test message test messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest messagetest message")
.setPositiveButton("Save All", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
}
})
.setNegativeButton("Select All", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
}
})
.setNeutralButton("Unselect All", null)
.create();
d.show();
}
图片
当我使用v7:24.0.x时,这些问题不存在,我今天更新了SDK和构建工具