title: Android button with icon and text
body: <p>I have some buttons like this in my app:</p>
  
  <pre><code>    &lt;Button
          android:id="@+id/bSearch"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:padding="16dp"
          android:text="Search"
          android:textSize="24sp" /&gt;
  </code></pre>
  
  <p>I'm trying to create a same button with text and a icon. 
  android:drawableLeft doesn't work for me (Maybe it would, but i don't know how to set a max height to the icon).</p>
  
  <p>So i created a LinearLayout with a ImageView and a TextView and made it act like a button:</p>
  
  <pre><code>    &lt;LinearLayout
          android:id="@+id/bSearch2"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:background="@android:drawable/btn_default"
          android:clickable="true"
          android:padding="16dp"
          android:orientation="horizontal" &gt;
  
          &lt;ImageView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_vertical"
              android:layout_marginLeft="5dp"
              android:adjustViewBounds="true"
              android:maxHeight="30dp"
              android:maxWidth="30dp"
              android:scaleType="fitCenter"
              android:src="@drawable/search_icon" /&gt;
  
          &lt;TextView
              android:id="@+id/tvSearchCaption"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="center_vertical"
              android:textSize="24sp"
              android:paddingRight="30dp"
              android:gravity="center"
              android:text="Search" /&gt;
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>My new button is exactly what i want (font size, icon and text placement). 
  But it doesn't look like my default buttons:</p>
  
  <p><img src="https://i.stack.imgur.com/HHZkw.png" alt="enter image description here"></p>
  
  <p>So i tried, to change the background and the text color of my new Button:</p>
  
  <pre><code>Button Search = (Button) findViewById(R.id.bSearch);
  LinearLayout bSearch2 = (LinearLayout) findViewById(R.id.bSearch2);
  bSearch2.setBackground(bSearch.getBackground());
  TextView tvSearchCaption = (TextView)findViewById(R.id.tvSearchCaption);
  tvSearchCaption.setTextColor(bSearch.getTextColors().getDefaultColor());
  </code></pre>
  
  <p>This gives a strange result, my old button, gets messed up:</p>
  
  <p><img src="https://i.stack.imgur.com/VSSkB.png" alt="enter image description here"></p>
  
  <p>When i change the order of these two buttons in the XML, so the "new button" goes first, it makes another strange result:</p>
  
  <p><img src="https://i.stack.imgur.com/HluhB.png" alt="enter image description here"></p>
  
  <p>Now i noticed, that when i try to press the old button, the new one gets pressed.</p>
  
  <p>Any ideas?</p>