Я пытаюсь создать базовый макет для каждого вида деятельности. в макете есть панель действий и нижний колонтитул. у меня нет проблем, чтобы показать нижний колонтитул в регулярном действии, но активность MapView не показывает мой нижний колонтитул, хотя я добавляю его в xml:
<include layout="@layout/actionbar"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
</include>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:enabled="true"
android:apiKey="@string/mapAppId" />
<include layout="@layout/footer"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
</include>
есть ли способ загрузить мои маркеры в MapView после того, как карта закончила загрузку? теперь иногда мои маркеры показываются до загрузки карты.
благодарю!
ok, я нашел ошибку в карте Can
это правильный код:
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:clickable="true"
android:enabled="true"
android:apiKey="@string/mapAppId" />
<include layout="@layout/footer"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
</include>
обратите внимание на android: layout_height и android: layout_weight на карте.
я до сих пор не знаю, как проверить, загружена ли карта, прежде чем показывать маркеры
<include layout="@layout/actionbar"
android:id="@+id/headerlayout"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
</include>
<com.google.android.maps.MapView
android:layout_below="@+id/headerlayout"
android:layout_above="@+id/footerlayout"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:enabled="true"
android:apiKey="@string/mapAppId" />
<include layout="@layout/footer"
android:id="@+id/footerlayout"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
</include>