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
Trusted Contributor
marcelnijman
Posts: 118
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C

prevent scrolling

How to prevent scrolling in a ListView?

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: prevent scrolling

Can you be more specific?

There are samples where the list is shorter than the page.

 

Stuart

Please use plain text.
Trusted Contributor
marcelnijman
Posts: 118
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C

Re: prevent scrolling

I have implemented a UITableView-like class which consists of a main ListView and an overlapping index ListView on the right hand side (to allow for fast section selection). This index ListView should not be scrollable, but I don't see anything in the API which lets me control that. Also, the ListView on the opening screen of my app (which contains a list of functionalities of the app) should not be scrollable.

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: prevent scrolling

Ok, that's a bit clearer.

Sorry if I'm missing the obvious, but I'm not sure what scrolling behaviour you're referring to.   If a list view has data that fits on the screen, it still scrolls?

 

Stuart

Please use plain text.
Trusted Contributor
marcelnijman
Posts: 118
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C

Re: prevent scrolling

Here you see me pulling down the index on the right.

 

https://dl.dropbox.com/u/219844/bb10cw1.png

 

It happens even if I hard-code the size of the ListView, and if it fits on the screen.

Please use plain text.
Trusted Contributor
marcelnijman
Posts: 118
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C

Re: prevent scrolling

It's actually not scrolling but the rubber band effect.

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: prevent scrolling

[ Edited ]

I looked at enableScrollbar, but this is not pertinent: this shows or hides the scrollbar at the side that shows where you are in the list and how big the list is while you scroll.

 

I have not found a way to override the hit-scroll-top or hit-scroll-bottom animation of a list view.

 

In the current release, your options are limited.

Have you considered:

- a fixed layout of text buttons

- an action bar, where the months show up as overflow items

- a dropdown

 

If none of these is suitable, and if you also are not able to override the animation, please request a feature in Issue Tracker: http://supportforums.blackberry.com/t5/Java-Development/Developer-Issue-Tracker/td-p/271768

 

Stuart

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: prevent scrolling

Have you made any progress or discovered anything new?

 

Stuart

Please use plain text.
Trusted Contributor
marcelnijman
Posts: 118
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C

Re: prevent scrolling

Nope. I perfer to keep it a ListView, instead of messing with buttons, because lists can be easier refreshed. The rubber band effect is not what I want, but I can accept it for now.

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: prevent scrolling

Please use plain text.