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

Java Development

Reply
Developer
Posts: 37
Registered: ‎07-17-2008
My Device: Not Specified

Smooth scrolling with large components

Guys,

 

In some of our interface we have a list of large fields organized vertically in the device's screen. Some times they are larger than the height of the screen so the content of the field does not appear completely. The problem is that when we scroll, the scroll is not smooth. It jumps to the next field and we are not able to see the entire content of the previous field.

 

A good example on how we would like it to work is the GMAIL application for BlackBerry. The control can be large with a lot of text but the scroll allows you to view the entire content of the control.

 

thank you very much for all the help as usual.

 

Regards,

 Gustavo

BlackBerry Development Advisor
Posts: 15,753
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Smooth scrolling with large components

If a text based field is focusable, you should be able to scroll within it.

 

Here is an example of a custom field that provides scrolling within itself.

 

Pimp My Object: Creating a TextBox Field

http://na.blackberry.com/eng/developers/resources/journals/jul_2005/creating_textbox_field.jsp

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 37
Registered: ‎07-17-2008
My Device: Not Specified

Re: Smooth scrolling with large components

Thanks Mark but that is not the case. Another example. Let's say, for example, that I use multiple BitmapFields one after the other to display multiple images. Now let's say the images are larger than the screen. When I scroll down, the focus "jump" from one image to the other so I can not scroll each image in a way that I see the entire image. Not sure if this is clear or not. If not I will prepare a small video to demo the behavior.

 

Thanks

Highlighted
BlackBerry Development Advisor
Posts: 15,753
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Smooth scrolling with large components

You could handle this in your own custom BitmapField.  You could override the navigationMovement methods to capture scrolling while the custom BitmapField has focus.  Then you would also override its paint method and paint part of the Bitmap inside the custom BitmapField.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Smooth scrolling with large components

I think sample code to do what Mark has suggested, made available by another forum member, can be found via this thread.

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=595&query.id=2711...

Developer
Posts: 37
Registered: ‎07-17-2008
My Device: Not Specified

Re: Smooth scrolling with large components

Thank you, guys. I will try it and post the solution later.

 

Regards,
Gustavo