umano / AndroidSlidingUpPanel

This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.
http://umano.me
Apache License 2.0
9.5k stars 2.26k forks source link

Default behavior of sliding panel pushing up main content is not happening #789

Open HarisHashim opened 7 years ago

HarisHashim commented 7 years ago

In master Readme.md

"By default, the panel pushes up the main content. You can make it overlay the main content by using setOverlayed method or umanoOverlay attribute. This is useful if you would like to make the sliding layout semi-transparent. You can also set umanoClipPanel to false to make the panel transparent in non-overlay mode."

My sliding up panel is overlaying the main content panel instead of pushing it up. Since my main panel contain list of item that is scroll-able. The sliding panel will cover item that is in the bottom. I am hoping to show the bottom item if it push up instead of overlayed (as current default).

My expectation is that umanoOverlay attribute can be set to false to make this happen. However I can not find umanoOverlay attribute in the layout.

This is my layout if it helps:

    <com.sothree.slidinguppanel.SlidingUpPanelLayout  xmlns:sothree="http://schemas.android.com/apk/res-auto"
    android:id="@+id/survey_sliding_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="bottom"
    sothree:umanoDragView="@+id/dragView"
    sothree:umanoOverlay="true"
    sothree:umanoPanelHeight="@dimen/sliding_panel_height"
    sothree:umanoShadowHeight="@dimen/sliding_panel_shadow"
    sothree:umanoFadeColor="@android:color/transparent">

    <!-- MAIN CONTENT -->
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/layout_placeholder"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:baselineAligned="false"
            android:layout_margin="@dimen/sliding_panel_shadow"
            android:paddingBottom="@dimen/sliding_panel_height">

            <FrameLayout
                android:id="@+id/fragment_placeholder"
                android:layout_width="0px"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:paddingBottom="@dimen/fragment_placeholder_padding"/>
        </LinearLayout>

    </RelativeLayout>

    <!-- SLIDING LAYOUT -->
    <LinearLayout
        android:id="@+id/dragView"
        android:layout_width="match_parent"
        android:layout_height="360dp"
        android:background="#f2f3f4"
        android:clickable="true"
        android:focusable="false"
        android:orientation="vertical">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:hint="This is the slider" />
            <TextView
                android:id="@+id/user_email"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:hint="User email" />
        </RelativeLayout>

    </LinearLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>

Sliptonk commented 7 years ago

I got the same problem. Have you found a solution for it?

GeorgePractics23 commented 6 years ago

I'm interested in this too.

komayip commented 6 years ago

i finally use addPanelSlideListener -> onPanelSlide(View panel, float slideOffset) , to set layout myself

peter-yeh commented 5 years ago

I got this problem too, solved it, set the app:umanoOverlay="true" to "false"

<com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" app:umanoOverlay="false" android:gravity="bottom">