ResourcesCompat.getDrawable() vs AppCompatResources.getDrawable()
问题 I'm a bit confused with these two APIs. ResourcesCompat.getDrawable(Resources res, int id, Resources.Theme theme) Return a drawable object associated with a particular resource ID and styled for the specified theme. Various types of objects will be returned depending on the underlying resource -- for example, a solid color, PNG image, scalable image, etc. Prior to API level 21, the theme will not be applied and this method simply calls through to getDrawable(int). AppCompatResources