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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
guperez
Posts: 37
Registered: ‎07-17-2008

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

Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
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.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
guperez
Posts: 37
Registered: ‎07-17-2008

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

Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
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.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
peter_strange
Posts: 17,722
Registered: ‎07-14-2008

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...

Please use plain text.
Developer
guperez
Posts: 37
Registered: ‎07-17-2008

Re: Smooth scrolling with large components

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

 

Regards,
Gustavo

Please use plain text.