Have a question! getDrawable() is deprecated in API 22. So, if I make an app with the min API 16, how can I set an image?
I saw that I can use getDrawable(int id, t
You can try this way,
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { return context.getResources().getDrawable(resource); } else { return context.getResources().getDrawable(resource, null); }
may helps you