I implemented a simple tab layout by following the tuturial.
In the tutorial, the tabs are located on top of the screen. Is there any way to locate the tabs on the left side of the screen instead of locating tabs on the top? How to change the layout xml file ?
<?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 doesn't support handle tabs on the left side but here there is a possible alternative:
Existing patches for android tabwidget to allow tabs on left-hand side?
Another solution, is to write your own tab widget: http://groups.google.com/group/android-developers/browse_thread/thread/6587ffd8ea4ed74a#
精彩评论