title: How to get the color from a GradientDrawable?
body: <p>I have an <code>EditText</code> with the background defined in a xml file:</p>
  
  <pre><code>&lt;EditText
      android:id="@+id/myEditText"
      style="@style/Theme.x.EditText.ReadOnly"
      android:layout_marginRight="5dip"
      android:layout_span="7"
      android:nextFocusDown="@+id/myEditText2"
      android:selectAllOnFocus="true" /&gt;
  </code></pre>
  
  <p>xml file: <code>my_edit_text.xml</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" 
      android:shape="rectangle"&gt;
      &lt;gradient android:startColor="@android:color/background_dark" android:endColor="@android:color/background_dark"
          android:angle="0"/&gt;
      &lt;solid android:color="#FA0000"/&gt;
      &lt;stroke android:width="1px" android:color="#5A5D5A"/&gt;
      &lt;corners 
          android:bottomLeftRadius="3dip"
          android:topLeftRadius="3dip"
          android:bottomRightRadius="3dip"
          android:topRightRadius="3dip"
          android:color="@color/crAmarelo"/&gt;
      &lt;padding 
          android:left="5dip"
          android:right="5dip"/&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>And I need to get the color that the view has:</p>
  
  <pre><code>EditText et = (EditText) solo.getView(R.id.myEditText);
  GradientDrawable gd = (GradientDrawable) et.getBackground();
  </code></pre>
  
  <p>But I don't know how to get the solid color from the <code>GradientDrawable</code>.</p>