Closed PrinceSachdeva closed 7 years ago
Since the sticky header is a new instance of the view, framework level view state won't be synced. If you want to keep them in sync, I would recommend holding the state elsewhere (possibly something like a BehaviorSubject/BehaviorRelay that's injected into the view, or use a view model type pattern).
@bgogetap how i can get that reference to the new instance of that view, so that i can update that view to keep them in sync.
A reference isn't needed if using a dependency injection framework like Dagger/Dagger 2. If this isn't something you're currently doing, I'd suggest looking into it.
However, I may look into adding a listener to the library that will notify when a header is attached/detached and pass the instance of the view (or the view holder) to that callback. Would something like that help you?
@bgogetap If you will add a listener then it would be great.Thanks for your support
Sure, I'll hopefully get to it this weekend. And I mean that more than I did when I said that in #27 ;)
Thanks @bgogetap
@bgogetap : I want to sync both the views i.e view in normal state and view in header state.Lets suppose there is a radio group on that view and i want to sync the selected radio button in synced state.