Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/200.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使tabhost/tabwidget在Android蜂巢中垂直显示?_Android_Android Tabhost - Fatal编程技术网

如何使tabhost/tabwidget在Android蜂巢中垂直显示?

如何使tabhost/tabwidget在Android蜂巢中垂直显示?,android,android-tabhost,Android,Android Tabhost,我想让我的标签垂直显示在左侧。我用 android:orientation="vertical" 在tabwidget中。如果我包括这个 <uses-sdk android:minSdkVersion="11"/> 在我的清单文件中,它可以很好地显示出来。但是,因为我有一个连接到internet数据库的代码,需要将版本设置为3,所以当我将版本更改为3时,无法显示选项卡 <TabHost xmlns:android="http://schemas.android.com

我想让我的标签垂直显示在左侧。我用

android:orientation="vertical"
在tabwidget中。如果我包括这个

<uses-sdk android:minSdkVersion="11"/>
在我的清单文件中,它可以很好地显示出来。但是,因为我有一个连接到internet数据库的代码,需要将版本设置为3,所以当我将版本更改为3时,无法显示选项卡

<TabHost   
xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@android:id/tabhost"
android:layout_width="match_parent" 
android:layout_height="match_parent"
>
<LinearLayout android:orientation="horizontal"
              android:layout_width="match_parent" 
              android:layout_height="match_parent">
    <TabWidget android:id="@android:id/tabs" 
               android:layout_height="match_parent" 
               android:layout_width="380dip"
               android:layout_weight="0" 
               android:orientation="vertical"
               android:background="#ffe185"
               />
    <FrameLayout android:id="@android:id/tabcontent"
                 android:layout_height="match_parent" 
                 android:layout_width="0dip"
                 android:layout_weight="1"
                 android:background="#ffffff"/>
</LinearLayout>
</TabHost>

match_parent直到API 8才可用。尝试用填充父对象替换。如果只返回API 4,则可以使用