title: Text position on TabHost
body: <p>I created activity with tabhost: Code below:</p>
  
  <pre><code>&lt;TabHost
                      android:id="@+id/tabhost1_zabytek"
                      android:background="@null"
                      android:layout_width="fill_parent"
                      android:layout_height="fill_parent"&gt;
                  &lt;LinearLayout
                          android:orientation="vertical"
                          android:layout_width="fill_parent"
                          android:layout_height="fill_parent"&gt;
  
                      &lt;TabWidget
                              android:id="@android:id/tabs"
                              android:layout_width="fill_parent"
                              android:layout_height="40dp"
                              android:background="@drawable/tlo12"
  
                              /&gt;
                      &lt;FrameLayout
  
                              android:id="@android:id/tabcontent"
                              android:layout_width="fill_parent"
                              android:background="@null"
                              android:layout_height="fill_parent"
                              &gt;
                      &lt;/FrameLayout&gt;
                  &lt;/LinearLayout&gt;
  
              &lt;/TabHost&gt;
  </code></pre>
  
  <p>And programically try set text position:</p>
  
  <pre><code>TabHost host= (TabHost) findViewById(R.id.tabhost1_zabytek);
  final View view = host.getTabWidget().getChildTabAt(0);
  final textView = view.findViewById(R.id.title);
  ((TextView) textView).setGravity(Gravity.CENTER);
  </code></pre>
  
  <p>So , when I run my application on device with android 4.1 all is ok.</p>
  
  <p><img src="https://i.stack.imgur.com/uQlfZ.jpg" alt="enter image description here"></p>
  
  <p>But, when I run my application on device with android 2.3, application display text on tabhost in a wrong position.</p>
  
  <p><img src="https://i.stack.imgur.com/fmygS.jpg" alt="enter image description here"></p>
  
  <p>My application should display text position Gravity.Center on each version Android. What should I do?? How solve  my problem?</p>