1

enter image description here

I am trying to achieve something like the picture, I have grouped data , and every group can have 1 or more (different count of items) , most items in the groups share the view type which is simple icon , title, description kind.

But the tricky part is how can I get the header (in landscape mode ) aligned to first item of the group , and allow it to scroll with the list.

One way I could think was let one item in the recycleView be the whole group . i.e header + list items , but that would not give the recycling of the views, defeating whole purpose of reclycleview.

I am looking for some pointers or ideas on how I could approach this.

Note : Header height could be larger that item height and may extend till second item in the group. basically imagine the header to be an Icon and text

swati saoji
  • 1,987
  • 5
  • 25
  • 35
  • https://stackoverflow.com/questions/32949971/how-can-i-make-sticky-headers-in-recyclerview-without-external-lib Using sticky transparent header may be one way to go . still not sure how overlap on first header and first item could be achieved, but will explore this meanwhile. – swati saoji May 24 '20 at 01:36
  • How are you grouping the data? Do you store all the data in the same list? Can you show the adapter code so we get an idea on how you approached grouping the data? – Hasan Bou Taam May 24 '20 at 02:25

0 Answers0