Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Detect when the Next Header of a ListView is going to be visible (trying to mimic a sticky header)

$
0
0

Hello!!

I am trying to mimic a sticky header for my ListView and I want to detect when the next grouping header is going to be the one to be visible.

I have tried so many things on this but I am still not able to do it without doing it natively.

I have tried:

1.- ItemDisappearing and ItemAppearing events of the list view and a combination of both to try to tell which item is the last one of the group and when this one has disappear change the Group Header.

2.- Calculate the number of items displayed on the screen and when the user scrolls subtract the next item appeared and when the count reaches to cero then change the group header title.

Basically I want to achieve something like this (But not in the Toolbar the Month tittle is inside a StackLayout on top of the ListView):

https://media.giphy.com/media/fBLjnaxbtR2Ni/giphy.gif

Any ideas?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>