To get an Android application to display in landscape mode only (to lock it in landscape mode), add this line to your Activity definition in the AndroidManifest.xml file:
android:screenOrientation="landscape"
For example, I’m writing an Android football game right now, and this is the definition for my main activity in the Android manifest file:
<activity android:name=".MainActivity" android:screenOrientation="landscape" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
--
--
unsubscribe: android-porti...@googlegroups.com
website: http://groups.google.com/group/android-porting
---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-porti...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-porting/150fb306-42d2-45c2-9c67-f75d1961186en%40googlegroups.com.
android/frameworks/native/data/etc/handheld_core_hardware.xml
ignore "android.hardware.screen.portrait"
감사합니다.