android textview怎么设置颜色

您可以使用setTextColor()方法来设置TextView的颜色。以下是一个示例:

TextView textView = findViewById(R.id.textView);
textView.setTextColor(Color.RED);

您可以将Color.RED替换为所需的颜色值,也可以使用getColor()方法来获取资源文件中的颜色值。

阅读剩余
THE END