Android的文字颜色不会变色 [英] Android textColor won't change colour
本文介绍了Android的文字颜色不会变色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经试过...
机器人:文字颜色=#FF0000
&安培;
TextView的app_nameTextView =(的TextView)findViewById(R.id.app_name);
app_nameTextView.setTextColor(getResources()的getColor(R.color.white));
但它不会改变文本的颜色,是不是我做错了吗?
but it won't change the text colour, is there something I'm doing wrong?
推荐答案
试试这个
tv.setTextColor(Color.WHITE);
这篇关于Android的文字颜色不会变色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文