0
点赞
收藏
分享

微信扫一扫

'getWidth()' is deprecated,'getHeight()' is deprecated

getWidth()和getHeight()在API 13(3.2)过时

   


代替写法


DisplayMetrics dm = new DisplayMetrics();
this.getWindowManager().getDefaultDisplay().getMetrics(dm);
int width = dm.widthPixels;
int height = dm.heightPixels;




举报

相关推荐

0 条评论