开发者

Android tab layout placing tab at screen's buttom [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Android: Tabs at the BOTTOM

I'd like to place the Tabs开发者_运维问答 of tab layout in the buttom of the screen, iPhone like. How can I do so?


Refer to the below xml ... Now If you want to put your tabs to bottom just move your tabwidget below Framelayout (relativiely) as tabwidget and Framelayout are inside relative layout.

    <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">
        <RelativeLayout
            android:layout_width="fill_parent" android:layout_height="fill_parent">
            <TabWidget android:id="@android:id/tabs"
                android:layout_alignParentBottom="true"
                android:background="#FFFFFF"
                android:layout_width="fill_parent" android:layout_height="wrap_content"
                android:layout_marginLeft="0dip" android:layout_marginRight="0dip" />
            <FrameLayout android:id="@android:id/tabcontent"
                android:background="#00FFFF"
                android:layout_width="fill_parent" android:layout_height="wrap_content" />
        </RelativeLayout>
    </TabHost>

</LinearLayout>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜