Reputation: 182
I used:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
But only current screen is changed. I want to change orientation of all screens on device. How to rotate the home screen?
Upvotes: 1
Views: 9382
Reputation: 7209
Please try this in your every activity in the manifest declaration
<activity android:name=".YourActivity"
android:configChanges="orientation"
android:screenOrientation="fullSensor"/>
This will rotate your screen if the device is rotated and the device orientation is set to auto
Upvotes: 0
Reputation: 1213
What I understand from your qus is, you want to change orientation for all apps, If Am I correct, then you can't change rotation all the apps orientation in android, but you can change orientation in your app.
Upvotes: 0
Reputation: 13555
In your manifest file of your project just add this way with activity tag
<activity android:name=".YourActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"/>
and if you want your screen in particular orientation then add above properties in all activity tag..
Upvotes: 0