android - Toolbar leaving space when i tryed to hide on RecyclerView scroll -


i trying hide toolbar on scroll of recyclerview. , hides on scroll problem it leaves blank space after hiding.

and follow links below -

1 - tutlinks 1

2 - tutlinks 2

but can't solve problem.

please me getting wrong or give me suggestions solve issue.

i have found problem , fixed it. actually, problem in include tag.

in above code, had used include tag , include tag can't perform functionality of toolbar. means

app:layout_scrollflags="scroll|enteralways"

does not work in include tag.

if use toolbar directly in xml file scrollflags works fine.

or in toolbar.xml add layout_scrollflags

toolbar.xml

<android.support.v7.widget.toolbar xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:id="@+id/toolbar"     android:layout_width="match_parent"     android:layout_height="?attr/actionbarsize"     android:background="?attr/colorprimary"     app:popuptheme="@style/themeoverlay.appcompat.light"     app:titletextcolor="#ffffff"     app:layout_scrollflags="scroll|enteralways"        /> 

after changing it, have not needed hide , show toolbar manually.

and working fine.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -