kds6253
kds6253

Reputation: 855

Android view set text color

I am trying to dynamically change the font and background color of my app but when I try to set it just turns gray no matter what color I choose. I have verified the color is correct. any ideas.

mTitleText is a EditText

mTitleText = (EditText) findViewById(R.id.note_edit_title);
mTitleText.setTextColor(R.color.defaulttextred);

Upvotes: 1

Views: 3725

Answers (1)

Just use

mTitleText.setTextColor(getResources().getColorStateList(R.color.defaulttextred));

Upvotes: 2

Related Questions