Reputation: 1005
when changing TextView color programmatically from my own color.xml it doesn't give me the real color but if I use the android colors it will work fine
for example
android color: textview.setTextColor(Color.BLACK);
android color: textview.setTextColor(Color.WHITE);
android color: textview.setTextColor(Color.BLUE);
Android Colors will give the same colors
my own color: textview.setTextColor(color.maroon); color code(#800000)
my own color: textview.setTextColor(color.MistyRose); color code(#FFE4E1)
my own color: textview.setTextColor(color.OldLace); color code(#FDF5E6)
my own colors will give another colors
any help??
Upvotes: 0
Views: 246
Reputation: 2664
Try this...
textView.setTextColor(getResources().getColor(R.color.some_color));
Upvotes: 3