1

我已经设置了一个背景图像,Tabhost但图像不适合它它是从每个的一半开始TabWidget 我尽力而为但无法摆脱这个请帮助!

我的 xml 代码是

<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@android:id/tabhost"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@drawable/back"
      >

    <LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <TabWidget
        android:id="@android:id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />
    <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"/>
    </LinearLayout>
 </TabHost>  

当前应用的快照是

http://img32.imageshack.us/img32/6519/captureyha.png

4

1 回答 1

1

你想从哪里开始?

编辑:试试这个。

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@android:id/tabhost"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@drawable/back"
      >


<TabHost
      android:id="@android:id/tabhost"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="#000"
      >

    <LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <TabWidget
        android:id="@android:id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />
    <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"/>
    </LinearLayout>
 </TabHost>  
</RelativeLayout>
于 2012-08-15T22:37:58.870 回答