繁体   English   中英

如何定位屏幕左侧的选项卡?

[英]How to locate tabs on the left side of screen?

我按照教程实现了一个简单的选项卡布局

在本教程中,选项卡位于屏幕顶部。 有没有办法找到屏幕左侧的选项卡而不是顶部的选项卡? 如何更改布局 xml 文件?

<?xml version="1.0" encoding="utf-8"?>
<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">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="5dp">
        <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"
            android:padding="5dp" />
    </LinearLayout>
</TabHost>

TabActivty 不支持左侧的句柄标签,但这里有一个可能的替代方案:

android tabwidget 的现有补丁允许左侧的选项卡?

另一种解决方案是编写自己的标签小部件: http://groups.google.com/group/android-developers/browse_thread/thread/6587ffd8ea4ed74a#

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM