Sunday, 15 May 2011

android - how to find color name based on color code? -



android - how to find color name based on color code? -

i have color code #ffa100. have define in values xml

<color name="orange">#ffa100</color>

i want find name "orange" based on color code value "#ffa100" how can find it? want utilize name of color in programme value several colors defined , has code server.

use,

color.parsecolor("#ffa100");

like,

mtextview.settextcolor(color.parsecolor("#ffa100")); //set text color mtextview.setbackgroundcolor(color.parsecolor("#ffa100")); // set background color

android android-resources color-codes

No comments:

Post a Comment