Android Emulator Always on Landscape
I would like to ask why is that my android emulator always displays on landscape even though I have a android:orientation="horizontal" on my code here is my screenshot
and when I change it to portrait mode using ctrl + f11 it is still on landscape mode.
`
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Splash"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Menu"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.project.billmoko.MENU" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Calculation"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.project.billmoko.CALCULATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Instruction"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.project.billmoko.INSTRUCTION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Tips"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.project.billmoko.TIPS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".BillingCenter"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.project.billmoko.BILLINGCENTER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".AboutUs"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.project.billmoko.ABOUTUS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>`
XML File
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/background2" android:screenOrientation="portrait" >
Please try replacing "horizontal" with "portrait". If that doesn't work please post your manifest, or at least the activity part of it. Note that this is an activity-specific attribute, not application. If you want all your activities to have one specific orientation you need to set this attribute in each one in the manifest.
Good luck!
Have you use the Google APIs with the Emulator, you can try to change the Google APIs to normal Android API. May the two answers help you
链接地址: http://www.djcxy.com/p/90738.html上一篇: 使用热键旋转Android虚拟设备AVD
下一篇: Android模拟器始终在风景中