try {
Resources resource = (Resources) getResources();
ColorStateList csl = (ColorStateList) resource
.getColorStateList(R.color.qianqubtnselector);
btn.setTextColor(csl);
} catch (Exception e) {
}
代码设置颜色
try {
Resources resource = (Resources) getResources();
ColorStateList csl = (ColorStateList) resource
.getColorStateList(R.color.qianqubtnselector);
btn.setTextColor(csl);
} catch (Exception e) {
}
代码设置颜色