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
mdodd
Posts: 188
Registered: ‎07-19-2012
My Device: Z10 LE
My Carrier: Three

Snapping items in a ListView

I'm trying to create a "snapping" effect on a horizontal listview, so that only one item is displayed on screen at a time. I notice that QT 4.7 has a snapMode property for ListView, but this has not been brought across to Cascades. Is this likely to be brought to Cascades in time for the BB10 launch, and if not, what properties should I be monitoring for a custom solution?



Did this post help you? If so, please make sure to "like" it!
Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: Snapping items in a ListView

Hi there,

 

snapping items is implemented, please see this page:

https://developer.blackberry.com/cascades/reference/bb__cascades__snapmode.html

 

Documentation is still under construction at the moment, however.

Let me know if you run into any issues.

 

Cheers!

 

Martin

 

Please use plain text.
Developer
mdodd
Posts: 188
Registered: ‎07-19-2012
My Device: Z10 LE
My Carrier: Three

Re: Snapping items in a ListView

Hi Martin,

Thanks for your reply. While that class contains the relevant enums and properties for a snap mode, it doesn't show how to apply that class to a ListView (e.g. via a myListView->setSnapMode function). Is there any way applying the snapmode to the listview?



Did this post help you? If so, please make sure to "like" it!
Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: Snapping items in a ListView

Hi,

 

Turns out this is not currently supported on the ListView's side - we will have to wait for further releases - I apologize for the inconvenience!

 

Cheers,

 

Martin

Please use plain text.