You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.
I have a list with just one list item (TextView) per section. That single list item's TextView contains wrapping text that can potentially consume the entire height of the ListView's container. If this is the case, I am finding that the pinned section item does not stay pinned, but rather it disappears only to reappear at the time the next section item is scrolled into view. To reproduce this, simply create the list with one ITEM per SECTION, and make the text for the item section very long - long enough to extend beyond the height of the ListView's container. I am observing this with the example app and have no other customization at all.
Update: To clarify, my test actually does the above, but my test list has 10 such sections, each with identical items, just for testing purposes. Again, only one item per section.
The text was updated successfully, but these errors were encountered:
void ensureShadowForPosition(int sectionPosition, int firstVisibleItem, int visibleItemCount) {
if (visibleItemCount < 2) { // no need for creating shadow at all, we have a single visible item
destroyPinnedShadow();
return;
}
...
}
I commented out this if block and it works fine. It seems that you are assuming here that a one item list would never be scrollable, therefore the shadow would be unnecessary. However, if the ListView's container is small enough in height, and the item's text length is such that the list can scroll, the shadow would still be useful, and desired. So, I think you need to somehow take into account whether the view is still scrollable, and not just look at whether visibleItemCount < 2. Does this make sense, and would you agree with this? Thank you.
Update: Actually, on further analysis, I think you can just remove the above if block with no ill effect. Please advise.
I have a list with just one list item (TextView) per section. That single list item's TextView contains wrapping text that can potentially consume the entire height of the ListView's container. If this is the case, I am finding that the pinned section item does not stay pinned, but rather it disappears only to reappear at the time the next section item is scrolled into view. To reproduce this, simply create the list with one ITEM per SECTION, and make the text for the item section very long - long enough to extend beyond the height of the ListView's container. I am observing this with the example app and have no other customization at all.
Update: To clarify, my test actually does the above, but my test list has 10 such sections, each with identical items, just for testing purposes. Again, only one item per section.
The text was updated successfully, but these errors were encountered: