[android-developers] Re: Check for which orientations are available to the device.

2011-11-28 Thread karteek
We can set orientation in our activity onCreate() method setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); On Nov 28, 5:36 am, XdebugX xdeb...@gmail.com wrote: I want my app to set the orientation to portrait

[android-developers] Re: Check for which orientations are available to the device.

2011-11-28 Thread XdebugX
Can you check if SCREEN_ORIENTATION_PORTRAIT is available to the device in the onCreate method first? On Nov 28, 7:28 am, karteek kartee...@gmail.com wrote: We can set orientation in our activity onCreate() method setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

[android-developers] Re: Check for which orientations are available to the device.

2011-11-28 Thread XdebugX
What if I did it like this: try { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } catch (Exception e) {}; I think this will do what I want. On Nov 28, 10:08 pm, XdebugX xdeb...@gmail.com wrote: Can you check if SCREEN_ORIENTATION_PORTRAIT is available to the device in the