title: calling setCompoundDrawablesWithIntrinsicBounds on multiple views with the same background gives inconsistent sizes
body: <p>I've got a <code>LinearLayout</code> with two <code>EditText</code> descendants (not direct children). I call <code>EditText.setCompoundDrawablesWithIntrinsicBounds(0,0,R.drawable.xyz,0)</code> on each to put a drawable (the same drawable) on the right side of each of the <code>EditText</code>s. The two edit texts are identical, except for their order in the <code>ListView</code>. However, the size of the drawable in the first <code>EditText</code> becomes larger than the second after adding the drawables. Specifically, the first <code>EditText</code> resizes to accomodate the intrinsic size of the drawable, whereas the second <code>EditText</code> does not (although it does grow some small amount).</p>
  
  <p>Why do two of the same drawables appear differently in the two near-identical views? </p>
  
  <p>Also, I could solve this problem by figuring how to make the drawable not force the <code>EditText to resize</code>. As you can see, I've followed the directions at <a href="https://developer.android.com/guide/topics/resources/drawable-resource.html#LayerList" rel="nofollow">https://developer.android.com/guide/topics/resources/drawable-resource.html#LayerList</a> regarding making the background scale, but that doesn't seem to do the trick.</p>
  
  <p>the code:</p>
  
  <pre><code>&lt;LinearLayout 
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:paddingLeft="10dp"
      android:paddingRight="10dp"&gt;
  
      &lt;TextView 
          style="@style/fieldLabel"
          android:text="phone number"/&gt;
      &lt;EditText
          android:id="@+id/contactPhoneField" 
          android:inputType="phone"
          android:layout_width="fill_parent"
          style="@style/editableField"/&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout 
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:paddingLeft="10dp"
      android:paddingRight="10dp"&gt;
  
      &lt;TextView 
          style="@style/fieldLabel"
          android:text="e-mail address"/&gt;
      &lt;EditText
          android:id="@+id/contactEmailField" 
          android:inputType="textEmailAddress"
          android:layout_width="fill_parent"
          style="@style/editableField"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>the drawable:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layer-list
      xmlns:android="http://schemas.android.com/apk/res/android" &gt;
      &lt;item&gt;
  
          &lt;shape android:shape="rectangle"&gt;
  
              &lt;gradient 
                  android:startColor="#FFD060" 
                  android:endColor="#FFBB33"
                  android:angle="270"/&gt;
              &lt;padding android:left="5dp" android:top="5dp"
                  android:right="5dp" android:bottom="5dp" /&gt;
              &lt;corners android:radius="5dp" /&gt;
              &lt;stroke android:width="2dp" android:color="#FF8800"/&gt;
          &lt;/shape&gt;
  
      &lt;/item&gt;
      &lt;item android:drawable="@drawable/warn"/&gt;&lt;!-- a 35x35 px png which is taller than the native height of an EditText--&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>then at some point I call:</p>
  
  <pre><code>contactPhoneField.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.error_background, 0);
  contactEmailField.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.error_background, 0);
  </code></pre>
  
  <p>Additionally, every subsequent time I call <code>EditText.setCompoundDrawablesWithIntrinsicBounds(0,0,R.drawable.xyz,0)</code> (after calling it the first time) causes first <code>EditText</code>'s size to toggle between matching the 2nd <code>EditText</code> and matching the drawable size!</p>