Centering of large font text in TextView
<p>I have an issue, which seems quite trivial, but I have not been able to solve it this far.</p>

<p>I have a full screen landscape activity in which I have a single LinearLayout containing two TextViews which occupy half of the screen each. One of the TextViews shall have a centered character, regardless of font size.</p>

<p>The problem is that when I increase font size of this character it does not center, but instead has its center below the center line of the screen.</p>

<p>Here is the activity with 200sp size character on a 800*480 screen, looks ok - character is centered:</p>

<p><a href="http://i122.photobucket.com/albums/o251/px_seven/char_200_sp.jpg" rel="nofollow">http://i122.photobucket.com/albums/o251/px_seven/char_200_sp.jpg</a></p>

<p>Here is the activity with 300sp size character, now the character has moved down:</p>

<p><a href="http://i122.photobucket.com/albums/o251/px_seven/char_300_sp.jpg" rel="nofollow">http://i122.photobucket.com/albums/o251/px_seven/char_300_sp.jpg</a></p>

<p>This is the layout (I change from the default font size 250sp in the code):</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true"&gt;

&lt;TextView
    android:id="@+id/tv1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_weight="1"
    android:layout_gravity="center"
    android:gravity="center_horizontal"
    android:background="#000000" /&gt; 

&lt;TextView
  android:id="@+id/tv2"
  android:lines="1"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:layout_weight="1"
  android:layout_gravity="center"
  android:gravity="center"
  android:background="#000000"
  android:text="N"
  android:textSize="250sp" /&gt; 

&lt;/LinearLayout&gt;
</code></pre>

<p>Does anybody see what the problem is?</p>

<p>Thanks,
Fredric</p>
