hello-studio
 1 DialogAppStoreUpdate dialogAppStoreUpdate = new DialogAppStoreUpdate(context, update_detail, update_url);
 2         dialogAppStoreUpdate.show();
 3         WindowManager windowManager = getActivity().getWindowManager();
 4         Display display = windowManager.getDefaultDisplay();
 5         WindowManager.LayoutParams lp = dialogAppStoreUpdate.getWindow().getAttributes();
 6         lp.width = (int) (display.getWidth()); //设置宽度
 7         dialogAppStoreUpdate.getWindow().setAttributes(lp);
 8 
 9 
10   WindowManager.LayoutParams layoutParams = getWindow().getAttributes();
11         layoutParams.gravity = Gravity.CENTER_HORIZONTAL;
12         layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
13         layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
14         getWindow().getDecorView().setPadding(30, 0, 30, 0);
15         getWindow().setAttributes(layoutParams);

 

分类:

技术点:

相关文章:

  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2022-01-13
  • 2022-01-18
猜你喜欢
  • 2021-12-03
  • 2021-09-15
  • 2021-09-15
  • 2021-12-24
  • 2022-01-07
  • 2021-08-05
相关资源
相似解决方案