androidlayoutslidingmenu

Umano SlidingUpPanel not working in CoordinatorLayout


I'm using Umano SlidingUpPanel to set a view like the following:

The SlidingUpPanel shows as it should be when itś expanded

But no matter what I do, It can't be shown hidden. Instead, it's "peeking":

The panel shows the Top-Most part of it

I need it to hide completely. This is my XML resource

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_height="match_parent"
    android:layout_width="match_parent"
    xmlns:sothree="http://schemas.android.com/tools"
    android:id="@+id/coordinator_layout"
    tools:context="com.pocket.poktsales.activities.InventoryActivity">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:popupTheme="@style/AppTheme.PopupOverlay" />

    </android.support.design.widget.AppBarLayout>


    <ProgressBar
        android:id="@+id/progressBar"
        style="?android:attr/progressBarStyle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical|center_horizontal"
        app:layout_anchorGravity="center_vertical|center_horizontal" />


        <android.support.design.widget.FloatingActionButton
            android:id="@+id/fab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|end"
            android:layout_margin="@dimen/fab_margin"
            android:src="@drawable/ic_box_add" />
        <com.sothree.slidinguppanel.SlidingUpPanelLayout
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            sothree:umanoDragView="@+id/sliding_up_panel"
            android:gravity="bottom"
            sothree:overlay="false"
            sothree:umanoPanelHeight="0dp"
            sothree:umanoParalaxOffset="100dp"
            sothree:umanoShadowHeight="4dp">
            <include
                android:id="@+id/include"
                layout="@layout/content_inventory" />
            <include android:id="@+id/sliding_up_panel"
                layout="@layout/content_product_detail"/>
        </com.sothree.slidinguppanel.SlidingUpPanelLayout>
</android.support.design.widget.CoordinatorLayout>

I have tried:

use 0 dp for panel height, no results. Actually it'snot even affected by that attribute no matter what's the value.

Wrap it inside a frame Layout with no result.

Can anyone help me to hide it completely?


Solution

  • In my particular case, I added the panel height programatically:

    panel.setPanelHeight(0);
    

    And now it's working!