set Text color programmatically
Well, although it was never thought by me that to I will be writing a blog page for telling users how to set color of a TextView programmatically- but setting android’s TextView programmatically requires few more efforts than one can possibly think of, which is why I decided to create this post –
In order to set color of a TextView, TextView.setTextColor(R.color.YOURCOLOR) is not enough!
It has to be used like this –
TextView myText = (TextView) findViewById(R.id.mytext);