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
Contributor
Posts: 16
Registered: ‎08-15-2011
My Device: 9780
My Carrier: Movistar

Horizontal Scroll Issue

Here's the thing: I have a populated GridFieldManager. The grid style is set to AUTO_SIZE. The grid's width is greater than the screen, so you have to scroll to the last right item.

It doesn`t matter if the last fields at right are focusable or not, when you scroll over there I keep getting this Exception.

 

I tried the code with JRE 5, 6 and 7 and still getting ArrayIndexOutOfBounds when scrolling to the right. You can scroll to the last right field, but if you try to continue scrolling you get that exception.

 

It seems that it only happens on touch devices, since it works fine on others devices.

 

GridFieldManager gfm = new GridFieldManager(4, 24, GridFieldManager.AUTO_SIZE);

populateGrid(); //add fields to the grid

add(gfm);

 

 

Any help please? PLEASE!

 

And sorry about my english since my first language is spanish.

 

Thanks!

New Developer
Posts: 108
Registered: ‎01-23-2012
My Device: torch,bold,curve,strom
My Carrier: Blackberry

Re: Horizontal Scroll Issue

Hi ,

you can use the method setHorrizontalScroll();

 

it will work!

Thanks & Regards,
Kumar Shivam
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Horizontal Scroll Issue

@shivam284: I very much doubt that setHorizontalScroll will help here, what makes you think it will help and how should the OP implement this? 

 

@OP: I'm sorry I have never used GridFieldManager.  I have always used TableLayoutManager for these sorts of things and never saw the need to change - TableLayoutManager was around before OS 5!  I also like TableLayoutManager because I can see all the code and tailor things like focus movement. 

 

You might like to try it instead of GridFieldManager, if only so that then you will be able to debug it better. If you don't know what that is, it is a sample Manager provided by RIM at one stage, I can point you at it, but you probably find it quicker if you search the forum.