Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Problemn when setting visibility in CoordinatorLayout

When I change visibility to GONE with CoordinatorLayout as parent view, the AppBarLayout already take place, but when I use the LinearLayout, i haven't this problem.

I want to use CoordinatorLayout for the slide of the AppBarLayout when scrolling RecyclerView.

enter image description here

like image 438
Okn Avatar asked Oct 01 '15 22:10

Okn


1 Answers

First in your AppBarLayout you should add:

app:layout_scrollFlags="scroll"

and in the FrameLayout you should add:

app:layout_behavior="@string/appbar_scrolling_view_behavior"

like image 117
Subhan Tariq Avatar answered Nov 09 '22 09:11

Subhan Tariq