Joe*_*Joe 7 string android colors
我需要获取颜色的字符串值.换句话说,我想#ffffffff从像<color name="color">#ffffffff</color>字符串格式的颜色资源中拉出来.有没有办法做到这一点?
ina*_*ruk 18
假设你有:
<color name="green">#0000ff00</color>
这是代码:
int greenColor = getResources().getColor(R.color.green);
String strGreenColor = "#"+Integer.toHexString(greenColor);
| 归档时间: | 
 | 
| 查看次数: | 9567 次 | 
| 最近记录: |