Android 我标签中的图像是拉伸的,看起来不太好。我怎么能;“非拉伸”;信息技术

Android 我标签中的图像是拉伸的,看起来不太好。我怎么能;“非拉伸”;信息技术,android,image,tabs,Android,Image,Tabs,提前谢谢。这里有一些代码和图片 这是图片。 这是我在主活动(onCreate)中的代码 这是home_tab.xml <?xml version="1.0" encoding="utf-8"?> 这是主要活动的xml <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android

提前谢谢。这里有一些代码和图片

这是图片。

这是我在主活动(onCreate)中的代码

这是home_tab.xml

<?xml version="1.0" encoding="utf-8"?>


这是主要活动的xml

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:id="@+id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"  >

    <LinearLayout 
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
       <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="wrap_content"
            android:layout_height="0dp" 
            android:layout_weight="1">
        </FrameLayout>

        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" 
            android:gravity="bottom">
        </TabWidget>

     </LinearLayout>
</TabHost>

请帮忙。谢谢你的建议
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:id="@+id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"  >

    <LinearLayout 
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
       <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="wrap_content"
            android:layout_height="0dp" 
            android:layout_weight="1">
        </FrameLayout>

        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" 
            android:gravity="bottom">
        </TabWidget>

     </LinearLayout>
</TabHost>
尝试将图像直接用于id选项卡小部件,它会起作用

编辑:

<LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dp"
    android:orientation="vertical">
    <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" >

    </FrameLayout>
</LinearLayout>


附上有关“拉伸”图像的外观以及您希望其外观的屏幕截图。抱歉。我忘了放图片链接,谢谢回复。谢谢回复。但是你能告诉我怎么做吗?我是android编程新手。:(正如Vipul Purohit所说,添加屏幕截图,然后说怎么做就很容易了。@abdroidNoob尝试一下。不幸的是,它没有。:(首先,我想感谢你给我的时间。但它看起来是一样的。)(
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:id="@+id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"  >

    <LinearLayout 
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
       <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="wrap_content"
            android:layout_height="0dp" 
            android:layout_weight="1">
        </FrameLayout>

        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" 
            android:gravity="bottom">
        </TabWidget>

     </LinearLayout>
</TabHost>
<LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dp"
    android:orientation="vertical">
    <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" >

    </FrameLayout>
</LinearLayout>