luizgrp / SectionedRecyclerViewAdapter

An Adapter that allows a RecyclerView to be split into Sections with headers and/or footers. Each Section can have its state controlled individually.
MIT License
1.68k stars 372 forks source link

Dont Need the header #139

Closed ayubbaba closed 5 years ago

ayubbaba commented 6 years ago

Hi Sir,

Sometimes I don't need the header in the section recycler view I am able to hide the title view using the visibility GONE but space is still occupied in the view is there any method to achieve these types

yccheok commented 5 years ago

I believe you are changing view visibility in onBindHeaderViewHolder. Don't do it there. It is not efficient.

A proper way is to call setHasHeader(false) of Section.