- Forums
- »
- General Discussion
- »
- Android Autorotation
|
Viewing 1 to 8 (8 Total) Android Autorotation |
|
|---|---|
JonTotal Posts: 272
Joined: March 08, 2012
|
Auto-rotation seems to work right out of the box for iOS. For Android, it doesn't appear to be. How do I enable it?
Tags:
Posted on July 23, 2012 at 4:03 AM
|
JonTotal Posts: 272
Joined: March 08, 2012
|
Re: Android AutorotationshouldRotateInterface and setFixedOrientation appear to only work for iOS, and I'm reading an earlier post by Josh saying that for Android, an NMML setting does the trick but doesn't elaborate on which setting that is.
Posted on July 23, 2012 at 7:34 PM
|
crayfellowTotal Posts: 204
Joined: November 28, 2011
|
Re: Android Autorotationcurrently, interface autorotation, fixed orientation, etc. only works for iOS.
Posted on July 23, 2012 at 8:16 PM
|
beezirTotal Posts: 2
Joined: July 07, 2012
|
Re: Android AutorotationHmm, this is weird. I had to specifically disable it for Android to make it NOT auto-rotate. In the AndroidManifest.xml, it checks for "orientation" on your window tag in the nmml file. If it's set to nothing, it should autorotate. (I disabled auto-rotation by setting orientation="portrait" in my window tag for if="mobile").
Posted on July 23, 2012 at 8:22 PM
|
crayfellowTotal Posts: 204
Joined: November 28, 2011
|
Re: Android Autorotationright, autorotation does work in android by default in the way you describe. However, customization in code beyond what you can do in NMML is not yet supported.
Posted on July 23, 2012 at 8:28 PM
|
crayfellowTotal Posts: 204
Joined: November 28, 2011
|
Re: Android AutorotationJon, if you're simply wondering what to put in your NMML to set a particular orientation and to prevent autorotation, just use orientation="portrait" or orientation="landscape" in the window tag of your NMML.
Posted on July 23, 2012 at 8:48 PM
|
JonTotal Posts: 272
Joined: March 08, 2012
|
Re: Android AutorotationThanks for the tips.
Posted on July 23, 2012 at 10:44 PM
|
crayfellowTotal Posts: 204
Joined: November 28, 2011
|
Re: Android AutorotationYup, that is how the "landscape" and "portrait" settings in the Android manifest work. The settings you apply to the window tag in your NMML are passed directly to the manifest. In order to implement a custom behavior we'd want to allow for a "nosensor" orientation in the manifest, then handle orientations programmatically in the activity class.
Posted on July 24, 2012 at 8:50 PM
|
