getResources().getDrawable方法的废弃

2017-05-15  本文已影响114人  简单Liml

参考链接:http://www.jianshu.com/p/e22d9dd93d4a

Android中的方法getResources().getDrawable() 在 API 22 废弃。

可使用下列方法进行代替:

ResourcesCompat.getDrawable(getResources(), R.drawable.name, null);

上一篇 下一篇

猜你喜欢

热点阅读