Orientation lock for your application

5 views
Skip to first unread message

Rohit Kalhans

unread,
Mar 19, 2011, 5:50:32 PM3/19/11
to bpgc-androi...@googlegroups.com

I have come across certain application in which you can lock the orientation change, or in other words, prevent your application from redrawing the
view when the orientation changes. Someone please post a short write-up if you  have used it successfully.
--
Rohit Kalhans
blogfolio: http://info-rohit.co.cc

 

Emaad Ahmed Manzoor

unread,
Mar 19, 2011, 9:50:14 PM3/19/11
to bpgc-androi...@googlegroups.com
<LinearLayout
    android:orientation="vertical">

--
Emaad Ahmed Manzoor,
Third Year Undergraduate,
BITS - Pilani, KK Birla Goa Campus.
halfclosed.wordpress.com


dharma teja jjj

unread,
Mar 20, 2011, 12:51:18 AM3/20/11
to bpgc-androi...@googlegroups.com
i think

<LinearLayout
    android:orientation="vertical"
>

does not prevent application to lock orientation.

Sagar Jauhari

unread,
Mar 20, 2011, 5:21:17 AM3/20/11
to bpgc-androi...@googlegroups.com
it doesn't.

Rohit Kalhans

unread,
Mar 20, 2011, 5:38:42 AM3/20/11
to bpgc-androi...@googlegroups.com
Linear layout vertical just identifies how eah element will be placed inside the linear layout

vertical= one below an other
Horizontal = one on the left side of the previous(till there is no further space).

Emaad Ahmed Manzoor

unread,
Mar 20, 2011, 12:15:09 PM3/20/11
to bpgc-androi...@googlegroups.com
Oh sorry! You need to add this to the AndroidManifest.xml:

<activity android:name=".YourActivityName"
android:screenOrientation="portrait">

Reply all
Reply to author
Forward
0 new messages