我已經搜索了所有答案,但提供的解決方案並未解決我的問題。在佈局上堆疊兩種不同尺寸的不同視圖
我有一個佈局,我顯示一些視圖(幾個按鈕和背景)。爲此我添加了一個自定義控件,我已經擴展了線性佈局。此控件顯示在佈局上方相當好。 我想要做的是添加一個額外的ImageView比這個控件大,但它會在它之前。
編輯:對不起,我希望這可以解決問題。
我有我的活動一個大的佈局(相對),我想在此佈局堆疊兩個額外的意見\佈局,最終版本將在圖片附:
這是我的佈局 - 它將imageview正確放置在菜單欄上,而不是其他菜單上。試圖把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>
你的問題是? –
@ Nathan-fig對不起,我添加了一些我想要的東西和我得到的一些概念圖像 – garkler
你的問題不是很清楚。您只需添加2張圖片而無需任何解釋。只需添加一個圖像,你最終需要什麼。它可能會給你更多的答案。 – blessenm