Android setting text view color from java code

前端 未结 9 1309
一个人的身影
一个人的身影 2021-02-07 06:43

I have a list and i write a custom adapter for this. And I want to set some text color for this (e.g. Orange color code #F06D2F). I am presenting the code snippet for my g

9条回答
  •  无人及你
    2021-02-07 06:54

    This is what worked for me.

    Import first: import android.graphics.Color;

    Then you can use: textview.setTextColor(Color.BLUE);

提交回复
热议问题