[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 wrote: > Can you check if SCREEN_ORIENTATION_PORTRAIT is available to the > device in the onCreate method

[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 wrote: > We can set orientation in our activity onCreate() method > > setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); > setRequestedOrientation(Act

[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 wrote: > I want my app to set the orientation to portrait on devices that c