Bargain23
Bargain23

Reputation: 1973

How do I make RelativeLayout disappear when scrolling in a RecyclerView

I've included a header RelativeLayout inside another RelativeLayout that contains the RecyclerView. I want the header to scroll with the RecyclerView, that is, as I scroll down the RecyclerView, the header will disappear and will only reappear at the very top.

This is the Activity layout (which includes both the RecyclerView and the header). This is the XML file for the header. This is the android Activity.

Upvotes: 0

Views: 383

Answers (1)

Mayank Garg
Mayank Garg

Reputation: 1304

I thing you should add header inside top of recycler view ,you can refer this link to implement header in recycler view

https://github.com/lopspower/HFRecyclerView

It's help me to add header at top of recycler view.

Upvotes: 1

Related Questions