android - When using toolbar and tablayout in appbarlayout, the toolbar doesnot dismiss when i scroll up -


i using view pager , fragments used in viewpager have listviews have been surrounded nested scrollviews. when scroll toolbar not dismissing. want running playstore tabs. written if recyclerview used instead of listview work fine, want use listview.

this code activity:

<android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent">  <android.support.design.widget.appbarlayout     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:theme="@style/themeoverlay.appcompat.dark.actionbar">      <android.support.v7.widget.toolbar         android:id="@+id/toolbar"         android:layout_width="match_parent"         android:layout_height="?attr/actionbarsize"         android:background="#2196f3"         app:layout_scrollflags="scroll|enteralways"         app:popuptheme="@style/themeoverlay.appcompat.light" />      <android.support.design.widget.tablayout         android:id="@+id/tabs"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:background="#2196f3" /> </android.support.design.widget.appbarlayout>   <android.support.v4.view.viewpager     android:id="@+id/viewpager"     android:layout_width="match_parent"     android:layout_height="match_parent"     app:layout_behavior="@string/appbar_scrolling_view_behavior" /> </android.support.design.widget.coordinatorlayout> 

this code fragments used in view pager:

<android.support.v4.widget.nestedscrollview xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent">  <listview     android:id="@+id/list"     android:layout_width="fill_parent"     android:layout_height="match_parent"     android:divider="#545454"     android:dividerheight="1dp"     android:listselector="@drawable/list_row_selector" />  </android.support.v4.widget.nestedscrollview> 


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -