Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 79
Registered: ‎04-04-2013
My Device: BB10 Dev Alpha Simulator
My Carrier: Blackberry
Accepted Solution

How to get snapped row's index in listview?

Hi all,

 

I'm using the listview's snap function to stop the scroll on single item. Is there a way to get the snapped row's indexPath without tapping on the row?

Regards,

Steve Chan
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: How to get snapped row's index in listview?

Highlighted
Developer
Posts: 79
Registered: ‎04-04-2013
My Device: BB10 Dev Alpha Simulator
My Carrier: Blackberry

Re: How to get snapped row's index in listview?

Just found a solution. Using the listscrollstatehandler and make use of the firstVisibleItem to get the indexPath of the visible row of the listview and everything will work.
Regards,

Steve Chan