Tabview
画面間を移動するためにを使用したいAndroidアプリを作成しようとしています。画面の下部または上部に配置すると、正常に機能します。しかし、アプリの要件に応じて、画面の中央に配置したいと思います。つまり、の要素の間FrameLayout
。2つの基本的な状況のコードは次のとおりです。
(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
。それを行う方法はありますか?