colors.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="solid_blue">#0000ff</color> </resources>
转换代码:
int color = getResources().getColor(R.color.solid_blue);
color就是个ARGB的颜色
colors.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="solid_blue">#0000ff</color> </resources>
转换代码:
int color = getResources().getColor(R.color.solid_blue);
color就是个ARGB的颜色