通过代码设置textview颜色

   Resources resource = (Resources) this.getResources();
   ColorStateList csl = (ColorStateList) resource.getColorStateList(R.color.orange);

 textview.setTextColor(csl);

 

    

你可能感兴趣的:(通过代码设置textview颜色)