Is getResources().getDrawable() deprecated in API22?

Asked 1 years ago, Updated 1 years ago, 97 views

From Android API22, getResources().getDrawable() has been deprecated, so do I just need to use getDrawable()? What's changed?

android android-resources android-5.1.1-lollipop drawable

2022-09-22 22:21

1 Answers

From now on, you can do ContextCompat.getDrawable(context, R.Drawable.**) like this.


2022-09-22 22:21

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.