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

Rotation Lock

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...
 
What are Portrait bottom and Landscape right? I've only ever used Portrait and Landscape - what else can there be?
 
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.
 
What are Portrait bottom and Landscape right? I've only ever used Portrait and Landscape - what else can there be?

If you use the monkey with the emulator it will get your app into all sorts of odd orientations, it sounds like these are some of those.
 
That is! But how does this program do those things????

Is there some standard Android API for screen rotation in all four positions??
This is the question)
 
I have no idea -- I have the opposite problem, I wish it would stop flipping it into those orientations!

It writes:

"Sending Flip keyboardOpen=false"
"Sending Flip keyboardOpen=true"

but doesn't give any more info
 
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.
 
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!!
 
Back
Top Bottom