Is there a way to lock orientation during runtime? For example I'd like to allow the user to lock the screen to landscape if the user currently in landscape and toggle the menu option.
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
Called on an activity, will lock it to landscape. Look for the other flags in the ActivityInfo class. You can lock it back to portrait or make it sensor/slider driven.
More info here: http://www.devx.com/wireless/Article/40792
1.4m articles
1.4m replys
5 comments
57.0k users