• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Rotation Lock

N0dGrand87

Lurker
Jul 30, 2010
3
0
Hello All. In my version of firmware (kernel 2.6.32.9) I have button "Orientation Lock" in status bar buttons (at Wi-Fi, Bluetooth, GPS and Silent buttons).

Does any body know how to create the same function in my application with Android SDK???

I need to lock my screen in any of four orientations: Portrait, Landscape, Portrait bottom, and Landscape Right.

setRequestOrientation does only one of two lock: Portrait or Landcsape.

Thanks...
 
If you LOCK your activity with setRequestedOrientation in landscape mode, and then rotate it from portrait mode to landscape mode by clockwise - you can see that screen will be rotated on 180 degrees.

How can I lock the activity in that position, and screen should be rotated correctly - not rotated.

I need to lock screen in all 4 position. API allows do it only in two.

Thanks.

Sorry for my bad english.
 
Upvote 0
Orientation locking is going to become more important as non-phones come into the market. I have a non-phone netbook running Android 1.6. It's the Augen GenBook 74. When apps re-orient the screen from landscape to portrait, the controls get pretty screwed up. It would be nice to be able to lock the device into one orientation and control set up. As a user, it would be nice to be able to reset the orientation back to normal without having to reboot the device.
 
Upvote 0
Bit of a bump this but I'm after a similar program. I've got a Dell streak which I like to use in portrait but the only way to do this is turning off the screen lock but that means it's permanantly swapping orientation, and I've tried a few lock programs but all they do is activate the standard screen lock leaving it stuck in landscape.
HELP!!
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones