title: Transparent color resource displays as red gradient in Android
body: <p>I'm having issues with color resources in Android, specifically using a transparent color.</p>
  
  <p>Any time I use my transparent color from the colors resources, the background of the View shows up as a red gradient instead when previewed in the emulator (tested versions 1.6, 2.2 and 2.3 on AVDs) or on a device (DroidX w/ 2.3.4). The transparent color is displayed correctly (or rather, is not) in the preview mode in Eclipse.</p>
  
  <p>As far as I can tell, this particular gradient isn't defined anywhere in my application. The title bar does use a red gradient from an xml shape resource, but it's completely different shades of red. There is also a very simple custom styles definition, but it only sets the window title background and text colors.</p>
  
  <p>My color definition:</p>
  
  <pre><code>&lt;color name="transparent"&gt;#0000&lt;/color&gt;  &lt;!--Tried #00000000 as well // --&gt;
  </code></pre>
  
  <p>An example View exhibiting the issue:</p>
  
  <pre><code>&lt;Button
      android:id="@+id/btn_login"
      android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dp" android:layout_marginRight="10dp"
      android:text="@string/ui_btn_login" android:textColor="@color/dark_grey"
      android:background="@color/transparent"
      android:drawableTop="@drawable/ic_login" android:drawablePadding="2dp" /&gt;
  </code></pre>
  
  <p>Results in the red gradient (when using the the color resource):
  <a href="http://i683.photobucket.com/albums/vv194/platinumF150/trans_resource.png" rel="nofollow">http://i683.photobucket.com/albums/vv194/platinumF150/trans_resource.png</a></p>
  
  <pre><code>&lt;Button
      android:id="@+id/btn_login"
      android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dp" android:layout_marginRight="10dp"
      android:text="@string/ui_btn_login" android:textColor="@color/dark_grey"
      android:background="#0000"
      android:drawableTop="@drawable/ic_login" android:drawablePadding="2dp" /&gt;
  </code></pre>
  
  <p>Results in the correct display (when using the color code inline):
  <a href="http://i683.photobucket.com/albums/vv194/platinumF150/trans_color.png" rel="nofollow">http://i683.photobucket.com/albums/vv194/platinumF150/trans_color.png</a></p>
  
  <p>However when I use <code>android:background="@android:color/transparent"</code> everything works normally...</p>
  
  <p>I'm seeing this throughout my application, any view that uses <code>@color/transparent</code> gets a red gradient.</p>
  
  <p>Obviously its not a huge deal to just use Android's transparent color everywhere, its just frustrating, and I'm sure there is a solution. I've never seen this issue before, but I've also never used too much transparency in an app.</p>
  
  <p>Thanks for any thoughts or input you might have!</p>