Android中TextView中设置字体颜色

来源:互联网 发布:兰蔻网络推广方案 编辑:程序博客网 时间:2024/04/30 13:58

  tv.setTextColor(this.getResources().getColor(R.color.red));


  tv.setTextColor(android.graphics.Color.RED);


  tv.setTextColor(Color.parseColor("#caa875"));


  tv.setTextColor(0xffff00ff);
  
0 0
原创粉丝点击