paetztm/recycler_view_headers

Header with Constraint Layout

Opened this issue · 7 comments

Hello,

It's possible to show multiple info in the header view? I try using a Constraint layout with two textviews but they are not show.

If I put text on the textview at change this text with the proper header text if the new text is smaller than previous text It not override widht.

Thank you!

I'm unclear on your problem. Do you have any source code and screen shots you can share?

The problem is when you change your textview by any container with two textview for example.

Can you share any source code and screen shots of the problem?

Hello,

I fork your example to show the error. I create new branch errorWithSectionHeader
https://github.com/jstr14/recycler_view_headers I think the problem is when I use a ConstraintLayout as header layout.

Thank you

The problem isn't ConstraintLayout. The problem is the header text view with ID list_item_section_text has layout_width of wrap_content. For whatever reason, the code for fixing the size doesn't work and I'm not sure how to fix it. If you changed the layout_width to match_parent then it works. I'll have to investigate further to see if I can get wrap_content to work.

Did anyone find a fix for this wrap_content issue?

There's a comment on stack overflow that says this:
One thing I would add, is that if your header layout has the title text view dynamically sized (e.g. wrap_content), You'd want to run fixLayoutSize after setting the title text as well.

I haven't tested it and haven't played with this library in years. Please let me know if it works.