ListView with scroll / fixed title bars

On Android, I would like to have a ListView control that lists various categories of data. I need a title / special line for each category.

I will also like the title bar to be fixed as the first line, scrolling through this category. When scrolling reaches the next category, the new title is fixed, and the previous one simply scrolls from the screen.

The following is a brief example. Heading 1 is fixed until we reach heading 2, which then replaces heading 1, etc.

I am having trouble finding a solution for this, as I'm not quite sure what to call it. Any ideas for a solution would be greatly appreciated. Thanks.

---------------------------- Header 1 ---------------------------- H1-Item H1-Item H1-Item H1-Item H1-Item H1-Item ---------------------------- Header 2 ---------------------------- H2-Item H2-Item H2-Item H2-Item ---------------------------- Header 3 ---------------------------- H3-Item H3-Item 
+1
source share
1 answer

You can take a look at the android-section-list project, which seems to be exactly what you want to achieve here.

+3
source

Source: https://habr.com/ru/post/1437722/


All Articles