[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.dsdp.ercp] Re: Switch the screen orientation

You are right, it is probably because of the XP. setOrientation is one of those functions that the end result is device dependent. Some devices do not "know" how to do draw their UIs in landspace/portrait and in those devices it is possible that it will fail.

I have not checked if it work correctly on win xp but getOrientation is the help to check the success of the function.
---
Gorkem



Jaime wrote:
I want to switch the screen orientation and I read a post in this group about it which suggested using Screen.setOrientation. I've used it:

MobileDevice mobileDevice = MobileDevice.getMobileDevice();
Screen[] screens = mobileDevice.getScreens();
if (screens.length > 0)
  screens[0].setOrientation(Screen.LANDSCAPE);

The execution was successful (without exceptions) but there was no effect at all. The GUI had the same aspect and layout. What does this method actually do? Perhaps the problem is that I'm testing my code in a desktop (with Windows XP).

Thank you in advance,
Jaime