Android getResources().getDrawable() deprecated API 22

With new android API 22 getResources().getDrawable() is now deprecated. Now the best approach is to use only getDrawable(). What changed? 16 s 16 You have some options to handle this deprecation the right (and future proof) way, depending on which kind of drawable you are loading: A) drawables with theme attributes ContextCompat.getDrawable(getActivity(), R.drawable.name); You’ll obtain … Read more