Android add custom attribute to styles
<p>I'm trying to implement a feature to let the user change the theme.</p>

<p>I've done this but depending on if the theme is light or dark, I need to use the opposite color to draw line on a canvas. I thought the best way to do this would be to simply call R.style.colorAttribute to get the correct color when doing the drawing.</p>

<p>In the styles.xml I have defined the following themes:</p>

<pre><code>&lt;style name="DarkTheme" parent="android:Theme.Holo" /&gt;

&lt;style name="LightTheme" parent="android:Theme.Holo.Light" /&gt;
</code></pre>

<p>Can anyone help on the best way to add an attribute here which will store the color. I've not done this before and was n't sure if I should use the color.xml file or the styles.xml file.</p>

<p>Thanks</p>

<p>And just to make it clear</p>

<p>I for the dark theme I need a white color
and for the light them I need the same attribute but in black.</p>
