Android - Problemn when setting visibility in CoordinatorLayout
Asked Answered
T

1

8

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

Transistor answered 1/10, 2015 at 22:17 Comment(3)
You are talking about the visibility (GONE) of which layout ? What do you mean by AppBarLayout already take place? Can you post some some code and make things clear in the question?Perse
Look the screenshotsTransistor
can you also post the layout xml file?Perse
B
1

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"

Brindisi answered 24/4, 2018 at 10:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.