xml - scrolling toolbar is not hiding when i scroll in android -


im trying hide toolbar on scroll down , cant able find problem have used

android.support:design:24.2.1

android.support:appcompat-v7:24.2.1

can find bug in code code helpful

<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_width="match_parent"     android:layout_height="match_parent"     android:fitssystemwindows="true"     tools:context="com.mako.movietake.mainactivity">      <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:layout_scrollflags="scroll|enteralways" />   <android.support.design.widget.tablayout             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:id="@+id/tablayout"             android:background="@color/colorprimarydark"             app:tabindicatorcolor="@android:color/white"             app:tabindicatorheight="1.5dp"/>     </android.support.design.widget.appbarlayout>      <android.support.v4.view.viewpager         android:layout_width="match_parent"         android:id="@+id/viewpager"         android:background="@color/colorprimary"         android:layout_height="match_parent"         app:layout_behavior="@string/appbar_scrolling_view_behavior">     </android.support.v4.view.viewpager>  </android.support.design.widget.coordinatorlayout> 

mainactivity.java

 viewpager=(viewpager)findviewbyid(r.id.viewpager);     viewpager.setadapter(new slideradapter(getsupportfragmentmanager(),getapplicationcontext()));     tablayout=(tablayout)findviewbyid(r.id.tablayout);     tablayout.setupwithviewpager(viewpager);       toolbar toolbar = (toolbar) findviewbyid(r.id.toolbar);     setsupportactionbar(toolbar); 

a tab fragment

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="vertical" android:layout_width="match_parent"     android:layout_height="match_parent"     android:scrollbars="vertical"     android:background="@color/colorwhite"     >         <android.support.v4.widget.nestedscrollview         android:layout_width="match_parent"         android:layout_height="match_parent"         app:layout_behavior="@string/appbar_scrolling_view_behavior"         android:fillviewport="true">     <gridview         android:id="@+id/gridview_cover"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:numcolumns="auto_fit"         android:gravity="center_vertical"         android:padding="0dp"         android:background="@color/coloraccent">      </gridview> </linearlayout> 


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -