Android getResources().getDrawable() deprecated API 22
Well, for developers who use Android Lollipop device for their development while using support library, this issue often raises up. Talk no more, here the solution I found on stackoverflow.
ContextCompat.getDrawable(context, R.drawable.your_drawable)
Happy coding!
ContextCompat.getDrawable(context, R.drawable.your_drawable)
Happy coding!
Comments
Post a Comment