-
Notifications
You must be signed in to change notification settings - Fork 554
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
Sticky Header doesn't update selected view state correct for MODE_SINGLE #347
Comments
@vladislav-z, following your code is quite difficult, could you please make a video (not public) and post it on your Youtube, so I can better understand your situation? Few notes:
|
@davideas |
@vladislav-z, I start to understand, I would like to try it out without recreating the app. Could you share the demo code in your Github project? |
@vladislav-z, I can't help you more if I can't see the code. |
@davideas Hello, i added sample https://github.com/Vladislav-Z/flexiblebug |
@vladislav-z, this should now be resolved, thanks for the demo bug. |
@davideas Thank you! And remove please final from public final void onBindViewHolder |
@vladislav-z, as explained in the migration page, from rc2 the classic method to bind VH becomes superfluous, since we will delegate to the items to bind themself to VH. Now the 3 methods in the IFlexible are declared abstract, therefore onBindViewHolder won't ever be used. Do you actually use it? how and in which occasion you should use it? |
@davideas yes, we actually use it because we are using RxJava and pass a PublishSubject to a viewholder in this method to pass touch events outside the adapter. This is related to the fact that we use MVP architecture so each viewholder also has a presenter which is "bound" to the view in the onBindViewHolder() method. I have tried to do it in the onViewAttachedToWindow() but this method is called later than onBindViewHolder() so it wouldn't work. |
Ok I see, but the presenter cannot be used inside of each item? why is necessary to call that method since it will skip all the super implementation?! |
For the moment, I've removed some final methods in the Snapshot. I will analyse better this point for final release. |
I have sticky headers
And simple items
and my adapter is initialized like this:
and all activation logic like in wiki example
But sometime's two headers are highlighted 1 view is not updated correctly. OnClick functions are call.
It happens when i have 2 headers coherently without children and first header is half-scrolled. After scroll it fix.
How i can fix this issue?
The text was updated successfully, but these errors were encountered: