如何在非活动中通过字符串访问drawable而不获取诸如Context之类的任何参数?

最佳答案

您可以尝试使用
ContextCompat.getDrawable
要么
Resources.getSystem()。getDrawable()-注意此方法已弃用

10-07 17:10