How to set tab height in android tabwidget from xml?
<p>I tried the solution:</p>

<pre><code>mTabHost.getTabWidget().getChildAt(i).setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,100));
</code></pre>

<p>but I want to do this in XML. </p>

<p>This is my layout:</p>

<pre><code>&lt;android.support.v4.app.FragmentTabHost
        android:id="@android:id/tabhost"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginRight="10dp" &gt;

        &lt;LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical" &gt;

            &lt;TabWidget
                android:id="@android:id/tabs"
                style="@style/tab"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="0"
                android:orientation="horizontal"
                android:textColor="@drawable/tab_text_selector" /&gt;

            &lt;FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_weight="0" /&gt;

            &lt;FrameLayout
                android:id="@+android:id/realtabcontent"
                android:layout_width="fill_parent"
                android:layout_height="0dp"
                android:layout_weight="1" /&gt;
        &lt;/LinearLayout&gt;
    &lt;/android.support.v4.app.FragmentTabHost&gt;
</code></pre>

<p>I tried to set the height of TabWidget but no results.</p>

<p>I use a custom view for the single tab:</p>

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

    &lt;ImageView android:id="@+id/img_tab"
        android:layout_height="30dp"
        android:layout_width="30dp"
        android:scaleType="centerCrop"
        android:layout_alignParentLeft="true"
        android:layout_margin="5dp"
    /&gt;

    &lt;TextView
        android:id="@+id/txv_tab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:textSize="22sp"
        android:textAllCaps="true"
        android:textIsSelectable="false"
        android:layout_toRightOf="@+id/img_tab"
        android:layout_margin="5dp"&gt;
    &lt;/TextView&gt;

    &lt;View android:id="@+id/tab_border" 
        android:layout_width="match_parent"
        android:layout_height="5dp"
        android:layout_alignParentBottom="true"
        android:background="@android:color/holo_green_light"
        /&gt;

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

<p>I tried to set the relativelayout height but every time I get fullscreen-height tabs.</p>

<p>How can I set the height?</p>
