私はこれに対する答えをあちこち探しましたが、提供された解決策は私の問題を解決しませんでした。
いくつかのビュー(いくつかのボタンと背景)を表示するレイアウトがあります。これに、線形レイアウトを拡張するために作成したカスタムコントロールを追加しました。このコントロールは、レイアウトの上に非常にうまく表示されます。私がやりたいのは、このコントロールよりも大きいImageViewを追加することですが、その前にあります。
編集:申し訳ありませんが、これで問題が解決することを願っています。
アクティビティ用に1つの大きなレイアウト(相対)があります。このレイアウトに2つの追加のビュー\レイアウトを積み重ねて、最終バージョンが添付の画像になるようにします。
これは私のレイアウトです。これは、他のメニューの上ではなく、メニューバー上にイメージビューをスタックします。FrameLayoutを別の場所に配置しようとしても、希望する結果が得られませんでした。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background">
<RelativeLayout android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="450dip">
<com.myproject.controls.SearchControl
android:id="@+id/scSearch"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<ExpandableListView android:id="@+id/lstItems"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/scSearch"
android:layout_marginLeft="26dip"
/>
</RelativeLayout>
<FrameLayout android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.myproject.controls.MenubarMain
android:id="@+id/mbMenuBarMain"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
/>
<ImageView android:src="@drawable/myicon"
android:layout_width="200dip"
android:layout_height="200dip"
/>
</FrameLayout>
</LinearLayout>