Reputation: 855
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
Reputation: 3926
Just use
mTitleText.setTextColor(getResources().getColorStateList(R.color.defaulttextred));
Upvotes: 2