slidingpanelayout - Android - umano SlidingUpPanelLayout - content fitsSystemWindows -


i using following library : https://github.com/umano/androidslidinguppanel.

i want display things below status bar when scrolling , can't make main_content (first container of slidinguppanellayout) fit screen. want display things below status bar when scrolling.

this first xml configuration :

<android.support.v4.widget.drawerlayout      ...     android:fitssystemwindows="true">      <com.hnhh.app3.fragments.model.fitssystemwindowsframelayout         ...         android:fitssystemwindows="true">          <!-- don't want,              container has padding top equals               status bar size, affect direct               childs => main_content (my fragments container) -->         <com.sothree.slidinguppanel.slidinguppanellayout             android:id="@+id/sliding_layout"             android:layout_width="match_parent"             android:layout_height="match_parent"             android:fitssystemwindows="true" // seems not supported             android:gravity="bottom"             ...>              <!-- main content - fragments placeholder -->             <com.hnhh.app3.fragments.model.fitssystemwindowsframelayout                 android:id="@+id/main_content"                 android:layout_width="match_parent"                 android:layout_height="match_parent"                 android:fitssystemwindows="true" // if parent doesn't not either.                 tools:background="@color/coloraccent" />              <!-- panel     -->             <framelayout                 android:id="@+id/..."                 android:layout_width="match_parent"                 android:layout_height="match_parent"                 android:clickable="true"                 android:fitssystemwindows="false" />         </com.sothree.slidinguppanel.slidinguppanellayout>          <framelayout             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_gravity="bottom">              <com.hnhh.app3.widgets.banneradwrapper.../>         </framelayout>      </com.hnhh.app3.fragments.model.fitssystemwindowsframelayout>      <include layout="@layout/navigation" />  </android.support.v4.widget.drawerlayout> 

i tried several parent's sliding_layout can't manage have desired behavior. sliding_layout never fits screen.

another way tried, kinda works, replace main_content empty viewgroup has match_paren (the library wants way) , main_content not inside slidinguppanellayout before.

<android.support.v4.widget.drawerlayout >     <com.hnhh.app3.fragments.model.fitssystemwindowsframelayout>          <!-- new main content - fragments placeholder -->         <com.hnhh.app3.fragments.model.fitssystemwindowsframelayout />          <com.sothree.slidinguppanel.slidinguppanellayout>             <!--  replaced old main_content empty     -->             <framelayout                 android:layout_width="match_parent"                 android:layout_height="match_parent"/>              <!--  panel     -->             <framelayout />         </com.sothree.slidinguppanel.slidinguppanellayout>          <framelayout>             <com.hnhh.app3.widgets.banneradwrapper/>         </framelayout>      </com.hnhh.app3.fragments.model.fitssystemwindowsframelayout>      <include layout="@layout/navigation" />  </android.support.v4.widget.drawerlayout> 

the thing second solution have empty container intercept touch events , couldn't manage pass them main content.

does got workaround? thanks

ok, found way through.

i removed library , used custom bottomsheetbehavior in https://github.com/fedorenkoalex/bottomsheetrecycler/. follow link , how implemented. fedorenkoalex solution.

the results same, thing when scroll nested recycler view (or other scroll view) handle scrolls except when cannot scroll anymore : if recyclerview @ top , try scroll top, push bottom sheet down. not bad in end because it's intuitive behavior.


Comments