0

I've followed the answer of rekaszero in Android remove space between tabs in tabwidget but now i need to set the tabs fit the screen automatically (in this mini-tut they are too big and they are off the screen) and also need to remove the text because the tabs should have only the icon to occupy the entire tab and not text. I can set their width in the main.class but i dont want to set their width, but they to fit auto.

Can someone help me out? thanks

Community
  • 1
  • 1
Bruno Carvalho
  • 111
  • 2
  • 16

1 Answers1

0

Ok. I figured out the big tabs width with the replacement with this code on main.xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TabHost
        android:id="@android:id/tabhost"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:padding="5dp" >

            <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" >
            </TabWidget>

            <FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:padding="5dp" >
            </FrameLayout>
        </LinearLayout>
    </TabHost>

</RelativeLayout>

Now i'll try to remove the text from it. If you already know how help me out. thanks

Bruno Carvalho
  • 111
  • 2
  • 16