簡體   English   中英

在Android的TabHost中更改視圖

[英]Changing the view in TabHost in Android

我如何更改android中的TabHost,所以它應該與iPhone中的UITabBarController相同? 即視圖應該在TabHost的頂部,而不是底部。

這是一個示例布局代碼,這些選項卡位於屏幕底部:

<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">
    <FrameLayout android:id="@android:id/tabcontent"
        android:layout_width="fill_parent" android:layout_height="wrap_content"
        android:layout_weight="1">
    </FrameLayout>
    <TabWidget android:id="@android:id/tabs"
        android:layout_width="fill_parent" android:layout_height="65dp"
        android:layout_marginLeft="0dip" android:layout_marginRight="0dip"
        android:layout_weight="0"></TabWidget>
</LinearLayout>
</TabHost>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM