好岸园IT技术学习网 hopean.com IT新闻 js网页特效 it技术 二次开发

android 底部选项卡(TabHost)

今天写Tab的时候由于TAB的跳转问题去查资料,倒反而发现更有趣的问题,就是如何将TAB放置在屏幕的底端。

<?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:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
       
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="1"
            android:padding="5dp" />

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


</TabHost>

本篇文章来源于好岸园it技术学习网 (http://www.hopean.com

原文链接:http://www.hopean.com/devlop/

 

csdn:http://blog.csdn.net/gloryflow/article/details/8473815

posted @ 2013-01-07 14:05  hopeanCom  阅读(543)  评论(0编辑  收藏  举报