芒果六斤半

关注

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

芒果六斤半

关注

阅读 52

2022-06-12

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

   


代替写法


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




相关推荐

seuleyang

【Android,Kotlin】ViewModelProviders‘ is deprecated. Deprecated in Java

seuleyang 87 0 0

奋斗De奶爸

浅析@Deprecated

奋斗De奶爸 32 0 0

三分梦_0bc3

Deprecated: Directive

三分梦_0bc3 45 0 0

jjt二向箔

@Deprecated注解功能

jjt二向箔 73 0 0

孟佳

Deprecated: Assigning the return value of new by reference is deprecated in……【解决方法】

孟佳 100 0 0

栖桐

mTabLayout.setOnTabSelectedListener is deprecated

栖桐 79 0 0

hwwjian

'setBackgroundDrawable()' is deprecated,setBackgroundDrawable过时

hwwjian 55 0 0

蓝哆啦呀

'getColor(int)' is deprecated ,getColor过时

蓝哆啦呀 53 0 0

快乐码农Alan007

getResources().getDrawable() deprecated API 22

快乐码农Alan007 167 0 0

兽怪海北

解决Deprecated: mysql_connect(): The mysql extension is deprecated_F_hawk189_新浪博客

兽怪海北 101 0 0

精彩评论(0)

0 0 举报