Skip to content

Commit e02c194

Browse files
authored
Update
1 parent c6a9c90 commit e02c194

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

CustomView/Base/[03]Color.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ RGB 从0x00到0xff表示颜色从浅到深。
8282

8383
``` java
8484
int color = getResources().getColor(R.color.mycolor);
85+
86+
int color = getColor(R.color.myColor); //API 23 及以上支持该方法
8587
```
8688

8789
### 4.在xml文件(layout或style)中引用或者创建颜色

0 commit comments

Comments
 (0)