0
我有一個列表視圖一的FrameLayout裏面,我想在地圖視圖 XML點擊的背景是列表視圖點擊頁眉
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="match_parent" >
<com.google.android.gms.maps.MapView
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/txt_totalHotels" />
<ListView
android:id="@+id/list_hotelRow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" >
</ListView>
</FrameLayout>
這裏我添加了一個線性佈局具有一定的高度,使它作爲透明爲ListView頭
我想點擊谷歌地圖 我想禁用列表視圖標題的點擊要點擊超過了谷歌地圖 請幫我爲這一個
您已將MapView和ListView重疊在一起,而且更多的layout_above屬性不適用於FrameLayout。 我建議你使用線性佈局來避免複雜性,因爲在FrameLayout中,如果你的MapView在你的ListView後面,onClickListener不會爲MapView觸發。 – Nanites
謝謝先生,我會更改代碼並嘗試實施這一項 – user1516991