How do I make sure my app is only for vertical layout?
I added this android:screenOrientation="portrait" but that doesn't seem to do the trick.
views:
837answers:
5
+2
A:
That is "the trick", if by "the trick" you want to ignore orientation changes and always be set for portrait orientation. See this sample project that demonstrates the technique.
CommonsWare
2010-03-23 22:33:54
+4
A:
You need to add to all your activity not for one only. I think you understood that setting is per application wide, but it isn't.
android:screenOrientation="portrait"
Pentium10
2010-03-23 22:36:52
+2
A:
Add android:configChanges="keyboardHidden|orientation"
to the activity.
Chris Smith
2010-03-23 22:43:22
+1
A:
Just to confirm Pentium10's answer. I was having a similar issue and adding android:screenOrientation="portrait" to the tag did the trick for me.
Bill
2010-03-24 01:26:41
+1
A:
android:orientation="vertical" put this attribute in layout root,try it it may help.
Kantesh
2010-03-24 11:34:33