Showing posts with label Dynamically set screen orientation android. Show all posts
Showing posts with label Dynamically set screen orientation android. Show all posts

Monday, 14 July 2014

Dynamically set screen orientation android

Set following code before setting activity layout as follow

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
setContentView(r.layout.yourlayout);