使android选项卡宽度等于图标图像宽度

使android选项卡宽度等于图标图像宽度,android,Android,我想在我的android应用程序中添加图标图像作为选项卡 添加时,选项卡高度等于图标图像高度。但选项卡的宽度大于图标图像的宽度。我希望选项卡宽度也等于图标图像宽度 我的申请图片: 我的要求: 另外,我想使选项卡的蓝色选择条不可见。我使用了“android:tabstripeenabled=false”,但它仍然可见 布局代码: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmln

我想在我的android应用程序中添加图标图像作为选项卡

添加时,选项卡高度等于图标图像高度。但选项卡的宽度大于图标图像的宽度。我希望选项卡宽度也等于图标图像宽度

我的申请图片:

我的要求:

另外,我想使选项卡的蓝色选择条不可见。我使用了“android:tabstripeenabled=false”,但它仍然可见

布局代码:

<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>


我想要一些提示使之成为可能。谢谢。

检查我在那里检查了代码,但它只改变了高度,宽度仍然大于图像宽度。