final CharSequence[] options={"Indoor Pharmacy","Outdoor Pharmacy","Laborataory"};
AlertDialog.Builder builder3=new AlertDialog.Builder(MainActivity.this);
builder3.create().getWindow().setLayout(1200, 1530);
builder3.setTitle("Pick your choice").setItems(options, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(), "U clicked "+items[which], Toast.LENGTH_LONG).show();
}
});
builder3.show()
我尝试使用上面的代码来显示带有 3 个选项的对话框。它工作正常,但我需要更改对话框的大小。你能帮我解决这个问题吗?