title: Centering large text inside a button in Android not working
body: <p>I need to center a large digit inside a <code>Button</code>, but it is always displayed shifted down. Please see the image:</p>
  <p><a href="https://i.stack.imgur.com/k7umR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k7umR.png" alt="enter image description here" /></a></p>
  <p><strong>My activity_main.xml file:</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      android:orientation=&quot;vertical&quot;
      android:layout_width=&quot;fill_parent&quot;
      android:layout_height=&quot;fill_parent&quot;&gt;
      &lt;Button
          android:textSize=&quot;490sp&quot;
          android:layout_width=&quot;fill_parent&quot;
          android:layout_height=&quot;fill_parent&quot;
          android:layout_gravity=&quot;center_vertical&quot;
          android:gravity=&quot;center&quot;
          android:textAlignment=&quot;center&quot;
          android:includeFontPadding=&quot;false&quot;
          android:text=&quot;8&quot; /&gt;
  &lt;/LinearLayout&gt;    
  </code></pre>
  <p>If I set some smaller text size — it is centered correctly.
  Also, if I use <code>ImageButton</code> with <code>android:scaleType=&quot;center&quot;</code>, the image is centered perfectly. But I need to center text.</p>
  <p>Could you please help, how to solve this problem?</p>
  <p>Definitely it is a Android bug. Probably there is some class or workaround.</p>