Lock to portrait orientation


#1

I initially thought that the manifest change would cause the app to remain in Portrait mode when the device was rotated to lansdscape (ie- stay sideways). However, this is not the case, and the resulting display causes the top text views to get scrunched so you can’t read the numbers in them.

According to this android page it is just info for Google Play to make your app only available to devices that support it.

I tried adding this to the manifest:

[code]android:screenOrientation="portrait"
android:configChanges=“orientation|screenSize”
… >

[/code]

but it doesn’t stop the display being redrawn in landscape mode when the device is rotated. In fact, removing all of them does not change how the device displays it when in landscape orientation.

Were you intending for the display to remain fixed if the device is rotated? Is there a way to do that?

Thanks.


#2

I just confirmed on my emulator that android:screenOrientation=“portrait” fixes the activity to portrait orientation.

The attribute was on the tag, wasn’t it?


#3

[quote]The attribute was on the tag, wasn’t it?
[/quote]

Uh, oops. :blush:


#4

ooops, had the same issue :slight_smile:
Thanks for asking and thanks for the answer