AlertDialog控件设置宽高大小(草稿)

简单方法: 

alertDialog.getWindow().setLayout(600, 400); //Controlling width and height.

 

常规方法 

WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
lp.copyFrom(alertDialog.getWindow().getAttributes());
lp.width = 150;
lp.height = 500;
lp.x=-170;
lp.y=100;
alertDialog.getWindow().setAttributes(lp);

你可能感兴趣的:(AndroidUI细节)