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

Asked 2 years ago, Updated 2 years ago, 110 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.