05-24-2013 08:11 AM
I defined 7 vertical managers witdth of 640 in a horizontal field of dimensions 640x300. when i am scrolling in a touch screen i want the each vertical manager to come in screen on a single scroll not half part. Can any one tell me
how to make the entire individual vertical manager to be in focus in one time of scroll.
05-24-2013 08:33 AM
It seems you want to 'centre' the VFM on the screen when you scroll horizontally.
You can do this using your own Thread and actively listening for scroll events, then using set HorizontalScroll to move the Fields into the correct position.
However an easier way of doing this is to set the focus on VFM you want centered. As long as you have something in the VFM which accepts focus and is full width, then the framework will try to display all of it, which means it will scroll and stop at a point this Field is in focus.
I think you could do this with a sort of NullField which did not display focus, had a full width and 1 pixel height.
05-24-2013 08:43 AM
i kept the nulllabel field it is working fine in non touch screen....when comes to touch if i am moving horizontallly without using traceball...then my half of the null field is coming in screen
05-24-2013 09:11 AM
Sorry missed that step.
When you swipe, focus is not moved. So you have to do it. One way is to have a scroll listener. When the scroll listener detects a scroll movement, it waits until the scroll changes stop happening. Then it figures out which VFM should be in the center, and sets focus on that.
That is easy to explain, not so easy to do, I've seen this done with a Thread, but perhaps you can do it with a Timer.
You may have some issues with determining which Field in the VFM should get focus, unless you always scroll to the top.
05-27-2013 02:45 AM
I check the touch device where i open the blackberry app world and select the games option. There on the screen we have list of options horizontally like "category", "topratings ".
here when i am scrolling horizontally according to the topheadings the below part in moving.
I also want the same functionality in my app....can any one tell me how to implement this.
05-27-2013 04:24 AM - edited 05-27-2013 04:25 AM
If you want to do something like App World, I suggest you look at developing for OS 6.0 and above only. I believe PaneManagerView does what you want. I have never tried to use this class or the associated classes since I still developing for OS 5.0.
I suggest that developing something like PaneManagerView yourself would be very hard, because you are not that familiar with how the BlackBerry UI works. But I think you would start by doing what we are doing here using ScrollChangeListener.
05-27-2013 04:34 AM
Thankyou. My app is for os7 ...so i will try panmanager as u said ...any useful information if you have about this please
share with me..it will be helpful for me
05-27-2013 04:48 AM
As noted, never used it. I suggest you create a simple standalone example and make sure it works for you. Then if you have problems, you will be able to post the code here.
Please let us know how you get on.