Подтвердить что ты не робот

Android MapView перекрывает DrawerLayout

У меня простая структура компоновки:

DrawerLayout
\-- FrameLayout // @+id/fragment_container
\-- ListView    // @+id/drawer_list

Нажимая любой элемент ящика, я вставляю/заменяю фрагмент с помощью FragmentTransaction.replace() на R.id.fragment_container с соответствующим экземпляром фрагмента. Один из этих фрагментов содержит MapView.

И он имеет проблемы с воспроизведением на разных устройствах, но в то же время DDMS показывает мне правый скриншот.

EDITED

Проблема возникает на таких устройствах:

  • Huawei U9508, Android 4.0.4 (API 15)
  • HTC Desire A9191, Android 2.3.5 (API 10)

На таких устройствах есть no issue:

  • Samsung Galaxy S2 с CyanogenMod Android 4.2.2 (API 17)
  • LG Google Nexus 4 Android 4.3 (API 18)

Может ли кто-нибудь помочь мне понять и исправить эту проблему?

Смотрите изображения:

Huawei U9508, Android 4.0.4 (API 15)

enter image description hereenter image description hereenter image description here

HTC Desire A9191, Android 2.3.5 (API 10)

enter image description here

DDMS

enter image description here

EDITED

расположение действий:

<?xml version="1.0" encoding="utf-8"?>
<DrawerLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/drawer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >

    <!-- The main content view -->
    <FrameLayout
            android:id="@+id/fragment_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            />

    <!-- The navigation drawer -->
    <ListView
            android:id="@+id/drawer_list"
            android:layout_width="240dp"
            android:layout_height="match_parent"
            android:orientation="vertical"
            />
</DrawerLayout>

расположение фрагментов:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        >

    <!-- other views here -->

    <com.google.android.gms.maps.MapView
            android:id="@+id/consumer_profile_map"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            />
</RelativeLayout>
4b9b3361

Ответ 1

Итак, я нашел обходное решение: просто оберните MapView в контейнер и поместите пустой View выше. Благодаря этому ответу: fooobar.com/info/447076/...

Есть мой обновленный макет:

<FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >

    <com.google.android.gms.maps.MapView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            />

    <View
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            />
</FrameLayout>