Update 颜色.md

This commit is contained in:
sloop
2016-01-10 16:36:28 +08:00
parent 865d838465
commit 1beb3eef20

View File

@@ -57,7 +57,8 @@ RGB 从0x00到0xff表示颜色从浅到深。
int color = getResources().getColor(R.color.mycolor);
```
#### 2.在其他xml文件(layout或style)中引用或者直接创建
```
``` xml
<!--在style文件中引用-->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/red</item>
</style>
@@ -68,4 +69,6 @@ RGB 从0x00到0xff表示颜色从浅到深。
android:background="#ff0000" //创建颜色
```
## 三.取色工具