How do I use access colours and gradients on Android?
<p>So i'm having a problem with using decimal colors in android.</p>

<p>I'm getting color codes from an external database.</p>

<p>For Example:</p>

<ul>
<li>16777215 is white</li>
<li>16711680 is red</li>
</ul>

<p>Now I want to use this colors to create a GradientDrawable.</p>

<pre><code>int color = myDbReader.getColor(); //returns the decimal color code
new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, new int[] {color, 0 });
</code></pre>

<p>The code example produces always a completley white gradient object.</p>

<p>I tried to google how to convert the decimal colors in the right way.. But i didn't find anything.</p>

<p>Can anyone give me a hint how to use the decimal colors in the right way?</p>
