android alertdialog 怎么设置高度自适应
展开全部
WindowManager wm = getWindowManager();
Display display = wm.getDefaultDisplay();
android.view.WindowManager.LayoutParams lp = dialog.getWindow().getAttributes();
lp.width = display.getWidth();
lp.height =LayoutParams.WRAP_CONTENT;
dialog.getWindow().setAttributes(lp);
任意取得任意设置
Display display = wm.getDefaultDisplay();
android.view.WindowManager.LayoutParams lp = dialog.getWindow().getAttributes();
lp.width = display.getWidth();
lp.height =LayoutParams.WRAP_CONTENT;
dialog.getWindow().setAttributes(lp);
任意取得任意设置
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询