With the following lines we can set the orientation with in the application..
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
If I want to set the orientation to every screen(not only with in application). how can i do this? Any help.
Thanks in advance
horizontal (landscape) - 0 vertical (potrait) - 1
You can try this.
Or you can try it in your way. In the onCreate method of that activity, which orientation you like to change,put this code in that. It will change that layout orientation.