0

I want to add icon image as a tab in my android app.

When added, the tab height is equal to icon image height. but width of tab is larger than icon image width. i want tab width also equal to icon image width.

My Application Picture: enter image description here

My Requirement: enter image description here

Also, i want to make blue selection strip of tab invisible. i used "android:tabStripEnabled=false" but still it is visible.

layout code:

<RelativeLayout 
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="fill_parent" 
android:background="@drawable/abst"
tools:context=".MainActivity">

<RelativeLayout 
        android:id="@+id/header"
        android:layout_width="fill_parent"
        android:layout_height="20dp"
        android:background="@drawable/header">


</RelativeLayout>

<TabHost
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@+id/header">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        >
    <HorizontalScrollView android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:scrollbars="none"
                      >
  <TabWidget android:id="@android:id/tabs"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:padding="0sp"
             android:tabStripEnabled="false"
             android:dividerPadding="0dp"/>
</HorizontalScrollView>
    <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"

        android:padding="5dp">


    </FrameLayout>
</LinearLayout>

I wants some hints to make it possible. Thanks.

4

0 回答 0