grennis / ExpandableRecyclerView

Recycler view adapter that adds expandable / collapsible items
MIT License
85 stars 40 forks source link

issue when 1stparentview and 2second parentview #8

Closed revathyegrove closed 8 years ago

revathyegrove commented 8 years ago

Hi,

I need to close the previously opened parentview in list items.

For eg: 1) I opened first parent view 2) when i click 2 parent view..i need to close 1 parent view.

This is my requirement ...how to achieve this?

grennis commented 8 years ago

Oh I see, like an accordion mode. I think this would be possible as-is from your app, but it would be nice to have an attribute on the view to just switch it into that mode. I will look into it.

revathyegrove commented 8 years ago

waiting for your response

grennis commented 8 years ago

This new feature is available in 0.9.2. You can use setMode(...) please check the readme.md

revathyegrove commented 8 years ago

its working fine for me...but i still facing the click events...i have to set click event for both parent view and child view ....how to achieve...if i code click event for parent view means it disturbs the childview...it not opening..

grennis commented 8 years ago

Try version 0.9.3... you can now override handleClick() in the HeaderViewHolder. You can call super to invoke the normal behavior or dont call it if you dont want it to expand/collapse on click.