-
Notifications
You must be signed in to change notification settings - Fork 550
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
Header view drawn multiple time #334
Comments
@IHNEL, well a mistake was done. Review your code to be sure the same header object is assigned to the 3 items, or maybe equals is not implemented properly. Read again the wiki for equals or simply read the method comments. |
@davideas Thank for quickly reply.
I debug and see the equals method works fine. Of course the |
@IHNEL, uhm theoretically it shouldn't work if you assign the same name. Can you check which is the reference in memory for the 3 header items? The header is displayed and inserted if it is seen as hidden, so in memory they should be different. |
I closed due to inactivity, but also the approach used should be refined. |
@davideas sorry for quite lately reply. I didn't keep good notification in Github. |
@IHNEL, the function |
Ok, Got it. Seems I have to reconsider my data structure. |
I debug and see that the method |
Thank. Finally I found the cause. And it works like a charm when I turn to this.
|
Hi,
I implement my recycler-view using FlexibleAdapter within
AbstractHeaderItem
andAbstractSectionableItem
to make sticky-header list.There are 3 list items which assigned 3 header items. 3 these header items have same data, and of course I implemented the
equals
method to return whether they are same. The issue is the header items drawn multiple time as below screenshotIf I created unique header data item and then set to all 3 items, then it draw correctly. What I am expecting is I can create header data item dynamically based on given data-fields, and there is a way to group same headers into a section.
Did I make any mistake?
The text was updated successfully, but these errors were encountered: