Hello all,
I would like to know is there any API to disable the auto-rotation?
(Or is can only be disabled by set the "rotate screen" function to off?)
Thanks.
Regards,
Hang
Hello all,
I would like to know is there any API to disable the auto-rotation?
(Or is can only be disabled by set the "rotate screen" function to off?)
Thanks.
Regards,
Hang
Last edited by hangyc; 2008-11-20 at 07:53.
In J2ME, there is no API to disable the autoscreen rotation. ?User can manually disable this feature in settings.
there is a alternate way to handle the event, when device comes into landscape mode, sizeChaged() method of Canvas class is called automatically . By implementing this method u can manage what u want to display on landscape mode on screen.
~Amardeep
What I do is I create a screen buffer the same size as the canvas and when sizeChanged is called I check to see if I'm in landscape mode.
If I am, I render as normal to the buffer and render the image buffer to the screen rotated 90 degrees so effectively I fake it not rotating. Downside is on QVGA phones that costs you 307k in heap but unfortunately the beloved phone manufacturers didn't think of that.