getResources.getColor弃用与取代

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hgxbra/article/details/54379851

android 6.0上getResources.getColor弃用

取代的方法是
ContextCompat.getColor(context, R.color.colorPrimary)

猜你喜欢

转载自blog.csdn.net/hgxbra/article/details/54379851