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
steve8820
Posts: 78
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
Please use plain text.
Developer
Zmey
Posts: 1,512
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

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

Please use plain text.
Developer
steve8820
Posts: 78
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
Please use plain text.