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

Разворот по GoogleMap

Прежде всего, я знаю, что SlidingDrawer устарел, но я не нашел альтернативы, поэтому я все равно его использую: 3 (Если кто-то знает альтернативу, пожалуйста, поделитесь им!)

Итак, у меня есть GoogleMap в моей деятельности (на самом деле фрагмент, но это неважно), и хороший SlidingDrawer на том же экране. Он отлично работает, но когда я открываю или закрываю скользящее устройство по карте, он начинает вести себя странно. Похоже, что карта хочет остаться перед скользящим разворотом. Когда ящик полностью открыт, он возвращается на передний план, и все в порядке.

Есть ли обходной путь для этого? Я с ума сошел!

вот мой макет:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/window"
    >
        <fragment
            android:id="@+id/hackedmap"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            class="com.google.android.gms.maps.SupportMapFragment" />

<SlidingDrawer
        android:id="@+id/drawer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:content="@+id/drawercontent"
        android:handle="@+id/drawerhandle"
        android:orientation="horizontal" 
        >

        <LinearLayout
            android:id="@id/drawerhandle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#00000000"
            android:gravity="center" >

            <ImageView
                android:id="@+id/slidingHandle"
                android:layout_width="40dp"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true"
                android:scaleType="fitEnd"
                android:src="@drawable/sliding_handle" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/drawercontent"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:background="#DD000000"
            android:gravity="center_horizontal|top"
            android:orientation="vertical" >

            <TextView
                android:id="@+id/selectednet"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_margin="4dp"
                android:text="Select a network:"
                android:textAppearance="?android:attr/textAppearanceLarge"
                android:textColor="#02bceb" />

            <ListView
                android:id="@+id/passivelist"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:choiceMode="singleChoice" >
            </ListView>
        </LinearLayout>
    </SlidingDrawer>

</RelativeLayout>
4b9b3361

Ответ 1

Поместите карту в относительный макет. Перед картой вид с той же мерой.

Пример:

<RelativeLayout
       android:layout_width="match_parent"
       android:layout_height="wrap_content" >

                            <include
                                android:layout_width="wrap_content"
                                android:layout_height="250dp"
                                android:layout_weight="1"
                                layout="@layout/general_map_fragment" />

                             <View
                                 android:id="@+id/imageView123"
                                 android:layout_width="match_parent"
                                 android:layout_height="250dp"
                                 android:background="@color/transparent" />


                        </RelativeLayout>