我正在尝试制作一个 Android 应用程序,我想在其中使用 aTabview
在屏幕之间导航。当我将它放在屏幕底部或顶部时,它工作正常。但是根据应用要求,我想把它放在屏幕中间。即在 的元素之间FrameLayout
。这是两种基本情况的代码:
(1)放在Tabview
底部:
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="0dp">
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
(2)放在Tabview
顶部:
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="0dp">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1" />
(3) 我想做什么:
我想把Tabview
. FrameLayout
更加具体:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:id="@+id/now_lisn_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
style="@style/background">
<include android:id="@+id/main_header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
layout="@layout/back_header" />
<include android:id="@+id/image_name_strip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
layout="@layout/image_name_holder"
android:layout_marginTop="5dip"/>
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="@color/listDivider"
android:dividerHeight="1dp"
android:footerDividersEnabled="false"
android:headerDividersEnabled="true"
style="@style/listBackground"
android:id="@+id/list"/>
</LinearLayout>
上面的布局包含FrameLayout
. 我想把Tabview
. ListView
有什么办法吗?