动态设置字体颜色无效的解决办法

470 阅读1分钟

homeText.setTextColor(R.color.bg); 这种在代码里设置颜色是无效果的

要使用

homeText.setTextColor(getResources().getColor(R.color.bg));