0

複数のレイアウトにまたがる「オーバーレイ」ビューを表示する方法を探しています(添付の画像に落書きされているように)複数のレイアウト(ヘッダー、リスト、詳細)のタブレット画面

私の調査によると、レイアウトは他のレイアウト内にしか存在できず、オーバーレイレイアウトのそのような概念はありません。それは可能ですか?助言がありますか?

どうもありがとう!ケイ。

4

2 に答える 2

1

FrameLayoutは、重複するビューをkanがレンダリングする唯一のレイアウトです。

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <TextView
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Primary View Primary View Primary View Primary View" />
    </LinearLayout>

    <RelativeLayout
        android:layout_width="100dp"
        android:layout_height="match_parent"
        android:background="#80FFFFFF" >

        <TextView
            android:id="@+id/textView2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="OverLap" />
    </RelativeLayout>

</FrameLayout>
于 2012-08-10T07:14:22.810 に答える
0

レイアウトの上にビューまたはレイアウト要素を表示する必要があると思います。このようなFrameLayoutを使用する必要がある場合

    <FrameLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">    


            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:orientation="vertical" >

                Your layout

            </LinearLayout>


            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:orientation="vertical" >

                Your view element to float or overlay 

            </LinearLayout>             


</FrameLayout>
于 2012-08-10T07:13:43.643 に答える