Change Screen Orientation Programmatically Android

Landscape – portrait orientation change:

boolean mbOrientationLandscape = true;
if(mbOrientationLandscape ){
	setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
	mbOrientationLandscape =false;
}else{
	setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
	mbOrientationLandscape =true;
}
This entry was posted in Android Examples Code and tagged . Bookmark the permalink.


Comments are closed.



4,976 views