На мой вопрос (ниже), это мой текущий макет:Android Google Maps пользовательский макет
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/verylightgrey" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="48dp"
android:weightSum="10" >
<TextView
android:id="@+id/location_banner"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="8"
android:background="#9e0039" />
<TextView
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="@drawable/verylightgrey" />
<ImageView
android:id="@+id/location_directions"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="2"
android:src="@drawable/directions" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:weightSum="2" >
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/map_satellite" />
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/map_street" />
</LinearLayout>
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="ladidadiomagadi"
android:clickable="true"
android:enabled="true" />
</LinearLayout>
Я хочу, чтобы включить некоторые кликах слушателей на части, которые не MAPview.
Возможно ли это сделать в действии, которое расширяет Mapactivity
, потому что единственный способ, которым я смог это сделать, - это переместить мои представления в параметры меню.
Заранее спасибо.
Не работает. Если я это сделаю, кажется, что часть за mapview оммитирована, и мой код не может найти идентификатор location_banner. – FilipPudak
Для меня детали над 'com.google.android.maps.MapView' (я имею в виду, в этом файле макета) не могут быть замечены. И если вы обменяете свои позиции просмотров в файле макета, необходимо сделать ** clean **. –