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
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);
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
3 matches
Mail list logo