02-09-2013 08:02 AM - edited 02-09-2013 08:18 AM
I have a ListView with a StackListLayout and SnapMode.LeadingEdge. ListItemComponent fills entire ListView, so there is only one item displayed at a time (except animations).
What is the idiomatic way to get the indexPath of displayed item?
Solved! Go to Solution.
02-09-2013 08:24 AM
In recent SDK versions firstVisibleItem property appeared in ListScrollStateHandler. I did not try to use it yet. There's also firstVisibleItemChanged signal:
What I'm currently using for similar task is attaching LayoutUpdateHandlers to all list items and tracking their updates to determine which item is the most visible one. But the items stop sending updates when going off-screen. I also had to use a timer to stop tracking off-screen items. If the first approach won't work I can give more details on this one.