08-31-2010 12:40 PM
AFAIK on screen orientation change sublayout method is called so accordingly i managed to set the width and height for screen managers and other fields.
In my screen there is background image in verticalfieldmanager and adding other fields like textboxfield, labelfields and custom buttons to it.
The orientation works well when say i was in potraite mode and change to landspace properly it renders the its fields on screen.
But when i was in landscape mode and change to potrait, fields get renders properly in landscape but when i move to potraite the fields size doen't get any change all fields go out of screen specially textboxfield.
Please need help on this issue.
09-03-2010 04:36 PM
What BlackBerry Smartphone model and BlackBerry device software version are you testing on? You can find this under Options, About on the BlackBerry Smartphone.
Can you post some sample code that shows your implementation?
09-07-2010 11:13 PM
Thanks MSohm for your reply. Now my problem is solved
Testing on device 9800 - OS v22.214.171.124 and 9550 - OS v126.96.36.1995.
I have implemented one custom VerticalFieldManager with bitmap image, it gets scale to device resoulution and paints the background. I have added defalult Vertical and HorizontalField Managers with it FIELD_HCENTER parameters wherever required and then added other fields to those managers.
Most of the screens in my application has its fields in center.
Using this it works as i explained in my above post.
To work it in all orientations i have implemented custom Horizontal and VerticalField Managers to place the fields in center. Now using those managers it works fine in all orientations.
I just want to knw in my previous case why fields get rendered properly with portraite to landscape and not with landscape to portraite.
09-07-2010 11:22 PM
My guess is that somewhere in your code you are storing a width and using that in calculations after the screen orientation changes. Could you post some code that demonstrates the problem?
10-07-2010 07:42 AM
whenever device orientation changed, there sublayout method of the screen and paint() method called.
you can use both method for orientation change problem. first check Display.getOrientation() which returns the ORIENTATION_PORTRAIT or ORIENTATION_LANDSCAPE etc., if found then change layout or paint screen according to that. Guys its really work, I have already used.