question-mark
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.

Question about re-using expandable header items?

See original GitHub issue

Basically, is it possible?

I have a screen where 1st level items upon click will expand and show 2nd level items below it. The 2nd level items themselves look just like the 1st level items, only difference is a transparent indentation in the left. The 2nd level items themselves can also be clicked and show 3rd level items, which again looks like the 1st and 2nd level items with only another indentation in the left side. The hierarchy depends on the data returned from the database and the levels are not fixed. So I am looking for a solution where I can re-use the header items but I can’t seem to wrap my head around how to implement it using the AbstractExpandableHeaderItem and AbsractExpandableItem. I have used this library before but only got until 2nd level items so I quite know the specifics of setting it up

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
johnernest02commented, Jan 13, 2019

I found that ExpandableItems has addSubItem method and subItems fields that I can use to add subItems. Thank you very much for the help

0reactions
davideascommented, Jan 13, 2019

@dev-JE02, yes there are such methods for subItems, but pay attention that if you add them expanded (already visible), adapter must be called also with addItemToSection: Read Headers-and-Sections#following-the-use-case-2. Otherwise you don’t need to call this method.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reusable TableView header views - Stack Overflow
The reason Apple built in the ability to reuse tableview cells is because while the tableview may have many rows, only a handful...
Read more >
Create components to reuse in designs - Figma Help Center
You can create a component out of any collection of objects or layers. components can be as simple as shapes, buttons or fields,...
Read more >
Webmaster Frequently Asked Questions - SEC.gov
Is there documentation about the meaning and structure of submission “header” elements? How can I understand EDGAR Timestamps?
Read more >
Accordions (Collapsible Sections)
You have long, complex procedures. You can break the procedure down into sub-sections, and make each sub-section an accordion. The reader can then...
Read more >
Recycling Lesson Plan for Preschoolers - IN.gov
This answer works for all items. Questions you can ask the student to help them decide if their item is recyclable, reusable or...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found