title: Android button text alignment issue
body: <p>Consider the following XML and the output:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;Button
          android:id="@+id/button1"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="5"
          android:gravity="center_vertical|center_horizontal"
          android:paddingTop="0dp"
          android:text="Button"
          android:textSize="100sp" /&gt;
  
      &lt;Button
          android:id="@+id/button2"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="30"
          android:text="Button"
          android:textSize="100sp" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/IOQ7j.png" alt="enter image description here"></p>
  
  <p>There is enough space for the button at the top to position the text at the middle, but still some portion (at the bottom) is trimmed, why?</p>
  
  <p>When I use the following background, still the text is not centered (see the output bellow)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector
      xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  &lt;item android:state_pressed="true" &gt;
        &lt;shape&gt;
              &lt;gradient
                  android:endColor="@android:color/darker_gray"
                  android:startColor="@android:color/darker_gray"
                  android:angle="270" /&gt;
              &lt;stroke
                  android:width="0dp"
                  android:color="@android:color/darker_gray"/&gt;
              &lt;corners
                  android:radius="0dp" /&gt;
              &lt;padding
                  android:left="0dp"
                  android:top="0dp"
                  android:right="0dp"
                  android:bottom="0dp" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  
      &lt;item android:state_focused="true" &gt;
         &lt;shape&gt;
              &lt;gradient
                  android:endColor="@android:color/darker_gray"
                  android:startColor="@android:color/darker_gray"
                  android:angle="270" /&gt;
              &lt;stroke
                  android:width="0dp"
                  android:color="@android:color/darker_gray"/&gt;
              &lt;corners
                  android:radius="0dp" /&gt;
              &lt;padding
                  android:left="0dp"
                  android:top="0dp"
                  android:right="0dp"
                  android:bottom="0dp" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  
      &lt;item&gt;        
          &lt;shape&gt;
              &lt;gradient
                  android:endColor="@android:color/darker_gray"
                  android:startColor="@android:color/darker_gray"
                  android:angle="270" /&gt;
              &lt;stroke
                  android:width="0dp"
                  android:color="@android:color/darker_gray"/&gt;
              &lt;corners
                  android:radius="0dp" /&gt;
              &lt;padding
                  android:left="0dp"
                  android:top="0dp"
                  android:right="0dp"
                  android:bottom="0dp" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/M2WVb.png" alt="enter image description here"></p>
  
  <p>(Tested on emulator 10.1" WXGA 1280x800 screen, landscape)</p>