dialog 弹框大小设置

2025-05-17 10:36:40

1、更改AlertDialog窗口大小的方法:AlertDialog dialog = new AlertDialog.Builder

dialog 弹框大小设置

2、(this).create();dialog.show();WindowManager.LayoutPara罪焐芡拂ms params =dialog.getWindow().getAttributes();params.width = 200;params.height = 200 ;dialog.getWindow().setAttributes(params);

dialog 弹框大小设置

3、注意:是先显示出来dialog,show()出来,才能再设置宽高属性

dialog 弹框大小设置

4、去除边框AlertDialog.setView(view,0,0,0,0);

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢