how to set default color with SetTextColor

Put your problem here if it does not fit any of the other categories.

how to set default color with SetTextColor

Postby clementlb » Sun Jan 23, 2011 4:51 pm

Hi !

I'm using SetTextColor to change the color of my TextView but I wish to go back then to default color.

How could I do ?

Thank you !
clementlb
Freshman
Freshman
 
Posts: 3
Joined: Sat Jan 01, 2011 1:25 am

Top

Re: how to set default color with SetTextColor

Postby jonbonazza » Sun Jan 23, 2011 8:41 pm

The easiest way is to define the default color in the colors.xml file in your values folder. Then, when you want to go back to default, you just access the color from this file.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 21 guests