Ruby on Rails & Android
[Android] Block application orientation
In my application, I set an AbsoluteLayout to put buttons on an exact positions.
But when I rotated the emulator (CTRL+F11), the layout was all broken.
So here’s how to block the application on the “Portrait” layout:
Set the attribute “screenOrientation” to the value “portrait” into your main Activity in AndroidManifest.xml:
<activity android:name=".activities.OxydroidActivity" android:label="@string/app_name" android:screenOrientation="portrait"> </activity> |
Thanks to Evan JIANG !
| Print article | This entry was posted by Alexandre Gherschon on December 19, 2009 at 3:11 PM, and is filed under Android, XML. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |

