1 deprecated android-resources android-color
getColor(int)已弃用。
我该如何使用getColor(int, theme theme)?
我使用了一些课程,但找不到如何使用getColor(int, theme theme).
使用一些东西作为
ResourcesCompat.getColor(getResources(), R.color.red, null)
Run Code Online (Sandbox Code Playgroud)
(在 API 级别 23 之前,不会应用主题,因此可能会应用null。)
| 归档时间: |
|
| 查看次数: |
3538 次 |
| 最近记录: |