I want to make my app work only in landscape mode but can\'t make it work. I have given screenOrientation = \"landscape\" even though the first page will be in
screenOrientation = \"landscape\"
You can use following code as per requirement:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); and setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
you have to put these code before setContentView(R.layout.layout_name.xml).
setContentView(R.layout.layout_name.xml)