title: Custom button with drawable, like facebook
body: <p>I have been all morning trying to do an custom shape like as facebook button like this:</p>
  
  <p><img src="https://i.stack.imgur.com/RHST9.png" alt="Facebook Login Button"></p>
  
  <p>But I'm trying to do it customizable, so in the future I could change the icon for example, but I'm going crazy.</p>
  
  <p>How I can make a button like this? Only the right part must be pressed, the left with the icon must be static although it will be pressed.</p>
  
  <p>I have this for the left side:</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;solid
                  android:color="@color/gecas_blue"/&gt;
  
              &lt;corners
                  android:topLeftRadius="4dp"
                  android:topRightRadius="4dp"/&gt;
              &lt;size
                  android:height="@dimen/bt_icon_size"
                  android:width="@dimen/bt_icon_size"
              /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
      &lt;item
          android:left="10dp"&gt;
          &lt;shape android:shape="rectangle"&gt;
              &lt;solid
                  android:color="@color/gecas_blue"/&gt;
              &lt;size
                  android:height="@dimen/bt_icon_size"
                  android:width="@dimen/bt_icon_size"
                  /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
      &lt;item android:drawable="@android:drawable/ic_input_add"&gt;
          &lt;size
              android:height="@dimen/bt_icon_size"
              android:width="@dimen/bt_icon_size"
              /&gt;
      &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>And this for the right, but I know how to continue:</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;solid
                  android:color="@color/gecas_blue"/&gt;
  
              &lt;corners
                  android:topLeftRadius="4dp"
                  android:topRightRadius="4dp"/&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
      &lt;item
          android:right="10dp"&gt;
          &lt;shape android:shape="rectangle"&gt;
              &lt;solid
                  android:color="@color/gecas_blue"/&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>This is the most similar library that I've found.</p>
  
  <p><a href="https://github.com/hoang8f/android-flat-button" rel="nofollow noreferrer">Flat Buttons</a></p>