set text color android code example
Example 1: change color of text in textview android
TextView text = (TextView) findViewById(R.id.text);
text.setTextColor(Color.parseColor("#FFFFFF"));
Example 2: text.settextcolor android
//From API 23 onward, getResources().getColor() is deprecated.
textView.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.color_black));