I've found a couple of issues with `LazyRow` and `...
# compose
d
I've found a couple of issues with
LazyRow
and
stickyHeader
. 1. If the header is vertically higher than the content the
LazyRow
change height when the sticky header item would scroll out of view. 2. if the
LazyRow
has
contentPadding
this is ignored for the
stickyHeader
, I would expect the sticky header to snap in a position that respect content paddding. are these 2 issues know? should I open 2 but reports? I assume these 2 issues translates equally with
LazyColumn
2
s
1. This makes sense to me, considering it's no longer on screen/rendered. The same would be true for non-sticky items coming into and exiting the screen, they would also change the height of the row. 2. I wasn't aware of this, but it sounds like a nice feature. If content padding was applied for sticky headers, scrolling items underneath them would look awkward. If I understand your point correctly. 🙂
d
1. it might make sense from the technical point of view, but it's rarely what the developer wants 2. sure, items would show up passing below the sticky header. I just think there should be an easy way to make the header respect the content padding. The only way I can think of now is to do not use content padding and instead apply the padding at the sticky header, but this is OK only if the sticky header is the first item, if it's the second item this would be added to the items arrangement space which it's usually NOT what you want. I cannot think of a straight forward way to manage this manually: monitoring scrolling position and adjusting padding of the sticky header. StickyHeaders are experimentals, so this is a good time to give feedback like this
s
Absolutely agree that this is the time to give feedback, hope I didn't come off as just shooting down your feedback, that wasn't my intention. 🙂 Yeah, on that first note, a way to have a
LazyRow(Modifier.height(IntrinsicSize.Min))
and have all it's children be the same height as the tallest item would be very cool. Although I see issues with this now wrt. when measurement happens. 👍 Nr. 2 would also perhaps be nice to control. For now, at least, adding padding manually works, but maybe have it be part of the DSL could be a possibility, too. 👍
d
they could both be controlled with parameters to
stickyHeader
fun
c
Are these known issues @Andrey Kulikov?
a
Ideally we would want to try to implement sticky headers differently, completely on top of the public api of LazyColumn, so everyone can configure it in the way they need. But we currently don’t have time to work on it unfortunately. feel free to provide your feedback in this bug: https://issuetracker.google.com/issues/231557184
👍 2
d
Thanks for your answer. Do you have a public roadmap with all these stuff you'd like to do? It would be nice if we could keep track of what's being worked on and have some kind of idea of how much it will take to see a feature implemented.
a
201 Views