我有一個視圖,其中包含一個頂視圖(這是一個mapview,但它尚未實現)和它下面的列表視圖。Android的listview覆蓋另一個視圖
我想要做的是讓頂部視圖的頂部覆蓋頂部視圖的底部一點點。這是類似於我想要實現的東西:
(無標籤頭和圖像會的MapView)
我不知道我怎樣才能實現那,這裏是我迄今爲止:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="250dp"
android:background="@android:color/holo_red_dark">
</View>
<com.hmm.widgets.CustomListView
android:id="@+id/runners_list"
android:background="@android:color/darker_gray"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:dividerHeight="10dp"
android:divider="@android:color/darker_gray">
</com.hmm.widgets.CustomListView>
</RelativeLayout>
我試過負邊界,這沒有奏效。我不確定我該如何實現類似的功能。我應該使用FrameLayout嗎?
我加入RelativeLayout的替代解決方案。 –
你是如何獲得該列表視圖頂部的填充以顯示圖像的? – mastrgamr