Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Header view drawn multiple time

See original GitHub issue

Hi, I implement my recycler-view using FlexibleAdapter within AbstractHeaderItem and AbstractSectionableItem 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 screenshot

screen shot 2017-04-07 at 11 46 41 am

If 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?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

IHNELcommented, May 16, 2017

Thank. Finally I found the cause. The equals() method wasn’t called if I set up the adapter like this: adapter.setDisplayHeadersAtStartUp(true).setStickyHeaders(true)

And it works like a charm when I turn to this.

davideascommented, May 15, 2017

@IHNEL, the equals method is called when you get an item from the list or when it is explicity called. With the last Snapshot I improved the calls on equals for managing Headers, check commits in issue #357.

Read more comments on GitHub >

github_iconTop Results From Across the Web

UITableView header dynamic height in run-time - Stack Overflow
Now my goal is increase the height of the table View header . Step Two : Add this method - (void)viewDidLayoutSubviews { int...
Read more >
UITableViewHeaderFooterView - NSHipster
Creating a Section Header View. In this example, we'll offer two different approaches to working with UITableViewHeaderFooterView . In the first ...
Read more >
Tables with Two Headers | Web Accessibility Initiative (WAI)
This page covers tables that have a simple row header and a simple column header ... The following table of opening times has...
Read more >
Add and remove headers and footers in Pages on Mac
You can add headers and footers—fields at the top and bottom of a page that can include text, images, page numbers, the page...
Read more >
Add a header or footer in Visio - Microsoft Support
To add a header or footer to a Visio diagram, use a border or title background page. ... When multiple drawing pages share...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found