New to Telerik UI for Xamarin? Download free 30-day trial

ListView for Xamarin.Android: StickyHeaderBehavior

If your list contains group headers as demonstrated in Group, Sort and Filter topic, you can use the StickyHeaderBehavior which will 'freeze' the group header of the top item:

TelerikUI-ListView-StickyHeaders

This means the GroupHeader will remain sticked to the top corner of the ListView while scrolling through the items until the whole group is scrolled away. As you scroll through the next group, the currently sticked group header will be pushed by the next group header.

Here's the code for this to work - just create an instance of StickyHeaderBehavior class and assign it to the ListView through AddBehavior method:

StickyHeaderBehavior stickyHeaderBehavior = new StickyHeaderBehavior();
listView.AddBehavior(stickyHeaderBehavior);
In this article