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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Regular Contributor
Posts: 60
Registered: ‎12-19-2012
My Device: BB10 Alpha B
My Carrier: SFR

ListView : how to get notify when current item has changed when in SnapMode

[ Edited ]

Hi !

 

I have a ListView whom Layout orientation is from Left to Right. I also have set these two properties :

 

snapMode: SnapMode.LeadingEdge
flickMode: FlickMode.SingleItem

 

The result is a nice ViewPager like in Android. I would now like to be notified when the user has swiped to a new page.

 

Unfortunately, none of the signals seems to be emitted when the ListView has gone from item i to item i+1

 

EDIT : in a short way : I am looking for the equivalent of onCurrentItemChanged that we had in QtQuick

 

Any idea ?

Regular Contributor
Posts: 60
Registered: ‎12-19-2012
My Device: BB10 Alpha B
My Carrier: SFR

Re: ListView : how to get notify when current item has changed when in SnapMode

I will try to do it differently

 

I know how many items I do have in my ListView. I know the width of one item. So I can calculate the total width of the ListView. If I can get access to the scroll position, I can then decide ich item is currently displayed.

 

Is there a way to know the current scroll position through a signal ?

 

Thanks

Regular Contributor
Posts: 60
Registered: ‎12-19-2012
My Device: BB10 Alpha B
My Carrier: SFR

Re: ListView : how to get notify when current item has changed when in SnapMode

[ Edited ]

Found solution : http://supportforums.blackberry.com/t5/Cascades-Development/ListView-which-items-are-currently-visib...

 

EDIT : not working as expected, still looking for a solution

Developer
Posts: 163
Registered: ‎04-28-2012
My Device: BlackBerry 9800
My Carrier: BlackBerry

Re: ListView : how to get notify when current item has changed when in SnapMode

Hi,

 

    If u get the indexpath for the current visible list item in the list view please provide the sample .

 

 

Regards,

Naresh Kodumuri.

Highlighted
Regular Contributor
Posts: 60
Registered: ‎12-19-2012
My Device: BB10 Alpha B
My Carrier: SFR

Re: ListView : how to get notify when current item has changed when in SnapMode

[ Edited ]

Any idea ? This deems to be pretty basic struff for a component like this.