cachapa / ExpandableLayout

An expandable layout container for Android
Apache License 2.0
2.34k stars 273 forks source link

Recycler view state not saved #49

Closed HimanshuNarang closed 6 years ago

HimanshuNarang commented 6 years ago

After recycling state of view is change from expanded to collapsed.

cachapa commented 6 years ago

This is by design. The demo is an example of how expandable layout can be integrated in a recycler view, not a complete solution.

If you need to keep the state when scrolling, you will have to save it somewhere in your adapter and set it accordingly when binding the view.

HimanshuNarang commented 6 years ago

Thanks for quick response.

I have one more question, Can i have recycler view as a child content of expendable parent view?

On Wed, Nov 29, 2017 at 2:38 PM, Daniel Cachapa notifications@github.com wrote:

This is by design. The demo is an example of how expandable layout can be integrated in a recycler view, not a complete solution.

If you need to keep the state when scrolling, you will have to save it somewhere in your adapter and set it accordingly when binding the view.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cachapa/ExpandableLayout/issues/49#issuecomment-347796842, or mute the thread https://github.com/notifications/unsubscribe-auth/ARBdfcmBRdbjuLM3lqyQe-AdEvC8kTZGks5s7R8LgaJpZM4QuhMs .

-- Regards Himanshu Narang

cachapa commented 6 years ago

Yes, that should work fine.

HimanshuNarang commented 6 years ago

Okay, Thanks

On Wed, Nov 29, 2017 at 3:44 PM, Daniel Cachapa notifications@github.com wrote:

Yes, that should work fine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cachapa/ExpandableLayout/issues/49#issuecomment-347814384, or mute the thread https://github.com/notifications/unsubscribe-auth/ARBdfQ041j4sQ17C4R8QB5iv-ehMbRy_ks5s7S6QgaJpZM4QuhMs .

-- Regards Himanshu Narang