Android——TextView的文字颜色设置和Enable作用

介绍

  TextView设置文字颜色

  正确使用

 

  enable:设置标签能否被实例化。

      false:不可以被实例化,也就无法通过findViewById( int id )初始化该元素

      true:可以被实例化,可findViewById(int id) 初始化该元素

 


//使用16进制设置颜色
TextView.setTextColor( Color.parseInt("#ffffff"));
//使用RGB255设置颜色 TextView.setTextColor( Color.rgb(255,255,255));
posted @ 2021-08-24 11:06  remix_alone  阅读(859)  评论(0)    收藏  举报