Issue
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??
Solution
Try this...
textView.setTextColor(getResources().getColor(R.color.some_color));
Answered By - Jagadesh Seeram
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.