Rotation Lock


Last Updated:

  1. N0dGrand87

    N0dGrand87 New Member This Topic's Starter

    Joined:
    Jul 30, 2010
    Messages:
    3
    Likes Received:
    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...
     

    Advertisement
  2. cmh0114

    cmh0114 Well-Known Member

    Joined:
    Jan 10, 2010
    Messages:
    116
    Likes Received:
    7
    What are Portrait bottom and Landscape right? I've only ever used Portrait and Landscape - what else can there be?
     
  3. N0dGrand87

    N0dGrand87 New Member This Topic's Starter

    Joined:
    Jul 30, 2010
    Messages:
    3
    Likes Received:
    0
    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.
     
  4. cp1

    cp1 Well-Known Member

    Joined:
    Apr 30, 2010
    Messages:
    375
    Likes Received:
    35
    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.
     
  5. N0dGrand87

    N0dGrand87 New Member This Topic's Starter

    Joined:
    Jul 30, 2010
    Messages:
    3
    Likes Received:
    0
    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)
     
  6. cp1

    cp1 Well-Known Member

    Joined:
    Apr 30, 2010
    Messages:
    375
    Likes Received:
    35
    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
     
  7. GatorDude

    GatorDude Member

    Joined:
    Aug 24, 2010
    Messages:
    5
    Likes Received:
    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.
     
  8. isitafox

    isitafox Member

    Joined:
    Jan 26, 2011
    Messages:
    14
    Likes Received:
    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!!
     

Share This Page

Loading...