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: 342
Registered: ‎09-28-2009
My Device: Not Specified

Problem with Storm reorientation

Greetings, everyone.

 

I've found this forum to be quite helpful in getting me through various problems of BB development (extra thanks for the Storm GPS thread).  Now, however, I have a question for which I've found no answer.

 

I have a midlet that I've ported to the storm.  All forms are custom-made, and I manually show/hide the virtual keyboard with a virtualkeyboardcontrol.  Normally, when I rotate the Storm, the sizeChanged() function is called, and everything works fine.  However, if the keyboard is currently being shown when you rotate the device, the sizeChanged() function is not called until you hide the keyboard or rotate the device again.  This is problematic because the screen will not display properly, and I cannot capture input from the keyboard correctly (since I interpret the keys based on orientation).  How can I prevent the keyboard from blocking this call?

 

Thanks very much.

Joe 

Developer
Posts: 342
Registered: ‎09-28-2009
My Device: Not Specified

Re: Problem with Storm reorientation

Anyone?
Developer
Posts: 723
Registered: ‎03-12-2009
My Device: Playbook

Re: Problem with Storm reorientation

Try overriding sublayout function.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Problem with Storm reorientation

Don't think there is a sublayout in a Midlet.....
Developer
Posts: 723
Registered: ‎03-12-2009
My Device: Playbook

Re: Problem with Storm reorientation

[ Edited ]

Ah midlet!  Missed that part.  Sorry.

 

 

I suppose one could implement the accelerometer to detect orientation changes.

Message Edited by dnepr on 09-30-2009 02:01 PM
Developer
Posts: 342
Registered: ‎09-28-2009
My Device: Not Specified

Re: Problem with Storm reorientation

Heh, I was looking for a way to do it with MIDlets, but indeed, you can't access sublayout() from there (at least not that I know of).  Any other ideas?  Maybe some undocumented function that overrides sizeChanged()?

 

Thanks! 

Developer
Posts: 342
Registered: ‎09-28-2009
My Device: Not Specified

Re: Problem with Storm reorientation

Won't the accelerometer just give me a general orientation of the device?  It wouldn't change the drawing coordinates like sizeChanged()...
BlackBerry Development Advisor
Posts: 15,693
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Problem with Storm reorientation

I've tried to reproduce this but found that the sizeChanged method is invoked when the virutal keyboard is present.  What 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 triggers this behaviour?

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