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.

Home Page:http://umano.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add scrollableView not working in case many recyclerView inside sliding panel

fukemy opened this issue · comments


<com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    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:gravity="bottom"
    sothree:umanoOverlay="true"
    sothree:umanoPanelHeight="0dp"
    sothree:umanoParallaxOffset="100dp"
    sothree:umanoScrollableView="@+id/rvHistory"
    sothree:umanoShadowHeight="4dp">

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

        <FrameLayout
            android:id="@+id/fragment_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/mainGray" />

        <android.support.design.widget.BottomNavigationView
            android:id="@+id/bottom_navigation"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:background="@color/mainGray"
            android:foreground="?attr/selectableItemBackground"
            app:itemBackground="@color/mainGray"
            app:itemIconTint="@android:color/white"
            app:itemTextColor="@android:color/white"
            app:layout_insetEdge="bottom"
            app:menu="@menu/menu_btm_navigation" />
    </FrameLayout>

    <!-- SLIDING LAYOUT -->
    <LinearLayout
        android:id="@+id/drag_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/mainGray"
        android:orientation="vertical">

        <com.futurisx.icamera.Library.ijkPlayer.JZVideoPlayerStandardForStreamingURL
            android:id="@+id/videoplayer"
            android:layout_width="match_parent"
            android:layout_height="200dp"
            android:transitionName="imageTransition" />

        <android.support.v4.widget.NestedScrollView
            android:id="@+id/scrollView"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <LinearLayout
                android:id="@+id/lnlContent"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/mainGray"
                android:animateLayoutChanges="true"
                android:orientation="vertical">


                <android.support.v7.widget.RecyclerView
                    android:id="@+id/rvStream"
                    android:visibility="gone"
                    android:layout_width="match_parent"
                    android:layout_height="46dp" />

                <TextView
                    android:id="@+id/cameraName"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:ellipsize="end"
                    android:padding="8dp"
                    android:text=""
                    android:visibility="gone"
                    android:textColor="@color/white"
                    android:textSize="18sp"
                    android:textStyle="bold" />


                <TextView
                    android:id="@+id/streamName"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:visibility="gone"
                    android:paddingLeft="8dp"
                    android:text=""
                    android:textColor="@color/white"
                    android:textSize="16sp" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:padding="8dp">

                    <LinearLayout
                        android:id="@+id/lnlEvent"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:clickable="true"
                        android:foreground="?attr/selectableItemBackground"
                        android:gravity="center"
                        android:orientation="vertical">

                        <ImageView
                            android:layout_width="28dp"
                            android:layout_height="28dp"
                            android:src="@mipmap/ic_notification" />

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:gravity="center"
                            android:padding="8dp"
                            android:text="Sự kiện"
                            android:textColor="@color/white" />
                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/lnlViewInMap"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:foreground="?attr/selectableItemBackground"
                        android:gravity="center"
                        android:orientation="vertical">

                        <ImageView
                            android:layout_width="28dp"
                            android:layout_height="28dp"
                            android:src="@mipmap/ic_place_white" />

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:gravity="center"
                            android:padding="8dp"
                            android:text="Vị trí"
                            android:textColor="@color/white" />
                    </LinearLayout>
                </LinearLayout>

                <android.support.v7.widget.RecyclerView
                    android:id="@+id/rvEvent"
                    android:visibility="gone"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:ellipsize="end"
                    android:lines="1"
                    android:padding="8dp"
                    android:textStyle="bold"
                    android:text="Lịch sử video gần đây"
                    android:textColor="@color/white"
                    android:textSize="20sp" />


                <TextView
                    android:id="@+id/tvNoHistory"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:visibility="gone"
                    android:paddingLeft="8dp"
                    android:text="Không có lịch sử"
                    android:textColor="@color/white"
                    android:textSize="16sp" />

                <android.support.v7.widget.RecyclerView
                    android:id="@+id/rvHistory"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />
            </LinearLayout>

        </android.support.v4.widget.NestedScrollView>
    </LinearLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>

Put recyclerview inside scrollview like this...

`

        <RelativeLayout
            android:id="@+id/llDragging"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/LightWhite">

            <LinearLayout
                android:id="@+id/OrderStatusLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="8dp"
                android:orientation="vertical"
                android:padding="4dp">


                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:padding="8dp">

                    <TextView
                        style="@style/TaskDataViewhead"
                        android:text="Order Status:"
                        android:textColor="@color/colorPrimary"
                        android:textSize="18dp" />

                    <ImageView
                        android:id="@+id/imgDown"
                        style="@style/TaskDataViewhead"
                        android:layout_width="30dp"
                        android:layout_height="30dp"
                        android:layout_alignParentRight="true"
                        android:background="@drawable/ic_slide_down" />

                </RelativeLayout>

                <android.support.v7.widget.RecyclerView
                    android:id="@+id/rvOrderStatus"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:nestedScrollingEnabled="false" />
            </LinearLayout>
        </RelativeLayout>
    </ScrollView>`