当面板设置为默认面板高度时,如何停止调整umano AndroidLidingPanel的主要内容大小

当面板设置为默认面板高度时,如何停止调整umano AndroidLidingPanel的主要内容大小,android,android-xml,slidingdrawer,android-sliding,bottom-up,Android,Android Xml,Slidingdrawer,Android Sliding,Bottom Up,我正在我的Android项目中使用。在这里,我使用谷歌地图作为我的主要内容。下面是相关的XML文件 <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="matc

我正在我的Android项目中使用。在这里,我使用谷歌地图作为我的主要内容。下面是相关的XML文件

<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"
    tools:context=".DemoActivity" >

    <com.mypkg.name.SlidingUpPanelLayout
        xmlns:sothree="http://schemas.android.com/apk/res-auto"
        android:id="@+id/sliding_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="bottom"
        sothree:collapsedHeight="78dp"
        sothree:dragView="@+id/linLayout"
        sothree:shadowHeight="4dp" >

        <FrameLayout
            android:id="@+id/activity_single_fragment_content"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#0000FF" >

            <fragment
                android:id="@+id/map_fragment"
                android:name="com.google.android.gms.maps.SupportMapFragment"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </FrameLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#eee"
            android:clickable="true"
            android:focusable="false"
            android:orientation="vertical" >

            <RelativeLayout
                android:id="@+id/drawerListItemProfile_relativeLayout"
                android:layout_width="match_parent"
                android:layout_height="80dp"
                android:background="@drawable/drawer_profile_selector" >

                <FrameLayout
                    android:id="@+id/imgFrameLayout"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentLeft="true"
                    android:layout_centerVertical="true"
                    android:layout_margin="5dp" >

                    <ImageView
                        android:id="@+id/drawerListItemProfile_imageView"
                        android:layout_width="@dimen/nav_profile_circle_size"
                        android:layout_height="@dimen/nav_profile_circle_size"
                        android:contentDescription="@string/contentDescription_drawer_profile_pic"
                        android:scaleType="centerCrop"
                        android:src="@drawable/profilepic" />
                </FrameLayout>
            </RelativeLayout>

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:scaleType="fitStart"
                android:src="@null" >
            </ImageView>
        </LinearLayout>
    </com.mypkg.name.SlidingUpPanelLayout>

</RelativeLayout>
单击地图上的标记时,我将面板设置为默认高度

slidingUpPanelLayout.setPanelHeight(defaultPanelHeight);
同样,当我单击地图(而不是标记)时,面板高度设置为0。当我这样做时,地图正在重新调整大小。我怎样才能阻止它。我希望此功能与Android移动设备中的谷歌地图一样有效。

Bazinga;)我做到了

只需在()中注释495行,即:

height -= panelHeight;

你可以走了。但若你们使用谷歌地图的放大缩小按钮,你们可能会遇到一个缺点。也就是说,向上滑动的抽屉将覆盖这些按钮。但在真正的谷歌地图中,这是不会发生的。

非常感谢!你知道有没有可能让它成为一个滑动动画,而不是仅仅弹出?就像谷歌地图一样?@deimos1988还没试过。如果我愿意的话,我会更新这个帖子。我问了一个关于这个()的问题,如果你认为你可能有一个解决方案,非常感谢你的回答!
height -= panelHeight;