See I have this android app and I kinda designed it using absolute positioning of elements so when I turn my phone 90 degrees the look is completely messed up. How I do I force my app to not change the layout when I turn my phone !
Asked
Active
Viewed 753 times
0
-
Do you want to lock the orientation to portrait? – Gabe Dec 23 '13 at 23:04
-
Yes ! I want the orientation to lock to potrait – Aditya Dec 23 '13 at 23:04
2 Answers
2
Add android:screenOrientation="portrait"
to the activity in your manifest.

Gabe
- 1,239
- 1
- 13
- 20
-
1There is a file called `AndroidManifest.xml` in your project. netbeans isn't normally used for Android development though. I suggest Android Studio. – Gabe Dec 23 '13 at 23:13
1
The best bet in your situation is to probably only allow a portrait orientation. You can do this in your AndroidManifest.xml with the following definition;
<activity android:name="com.example.SampleActivity" android:screenOrientation="portrait" />

marcus.ramsden
- 2,633
- 1
- 22
- 33