Originally Posted by saywow
I have a rooted android 4.2.2 tablet ,I want to block the default screen orientation when i turn off the auto rotation , that's mean :
when i turn off the auto rotation and i'm in landscape, i don't want it to turn to portrait (and vice-versa), and i prefer to use a code and not an app that stays always in memory
Someone can help me please?
Note : Please quote my post when you want to answer me, like that i will receive an email telling me that there is a new reply
-If you know to editing apk files then follow these steps.
- Decompile your default system launcher for example SecLauncher2.apk for SAMSUNG phones
using apk multitool.
- Go to \res\values
folder and open integers.xml.
- Search for this line:
- Change the integer number to one of actions bellow:
1 = Disabled
2 = Enabled when Screen Rotation is switched on (270 degree)
3 = As same as 2
4 = Always enabled even if Screen Rotation is switched off (270 degree)
5 = Always default position
6 = Always in landscape mode (to the left)
7 = As same as 5
8 = Always in landscape mode (to the right)
9 = Upside down portrait when Screen Rotation is switched on
10= As same as 4 but for all directions (360 degree)
- Save changes.. recompile, push it to your device and fix permissions to 644 and reboot.
if i helped you