Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to show/hide headers on demand. #387

Closed
wants to merge 5 commits into from
Closed

Add the ability to show/hide headers on demand. #387

wants to merge 5 commits into from

Conversation

raycoarana
Copy link

With this little change we could implement our UI that requires to show headers only when searching.

@emilsjolander
Copy link
Owner

I would rather implement this inside the adapter. An optional method like ?shouldShowHeaderForPosition(int position) this allows for more flexibility

@raycoarana
Copy link
Author

I don't see the use case where you need that flexibility. If you show for position 1, hide por position 2, then item at position 2 will look like be inside the same header as item 1, so its the same as telling the list that items 1 and 2 creates the same header.

@tomoyuki28jp
Copy link

@emilsjolander

I would rather implement this inside the adapter. An optional method like ?shouldShowHeaderForPosition(int position) this allows for more flexibility

StickyListHeadersAdapter is an interface. How do you wan to implement this as an optional method inside the adapter?

@tomoyuki28jp
Copy link

@emilsjolander

I see few people want this feature.
#344
#362

just have the lists empty view include the same layout as the first header.
#232 (comment)

I understand what you say, but providing this option like shouldShowHeaderForPosition is a bit easier.

@patedit
Copy link

patedit commented Apr 14, 2016

I've created a new PR for this feature tracking the problem down using a different approach (i.e. modifying the adapter VS switching between adapters for the WrapperList). This'll have some benefits from a UX point of view. Thanks! #453

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants