Reputation: 110
I first choose default orientation from my emulator. Then i choose to view landscape and it works. But again when i turn my emulator into default orientation then i find that my application orientation doesn't change.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
Upvotes: 2
Views: 346
Reputation: 61398
See if your application's manifest contains the following:
<activity... android:screenOrientation="portrait">
Remove this attribute. It locks the app into a specific orientation. However, when you do, your activity will be deleted and recreated every time orientation changes (potentially loading a different layout file). To handle the change of orientation without activity restart, add the following attribute to the <activity>
android:configChanges="orientation"
Upvotes: 0
Reputation: 11191
This is the issue that sometimes appears in emulator version 2.3 I solved this problem by running the application on 4.0
Upvotes: 1
Reputation: 9978
press home button of your emulator and make your emulator to default orientation after run your application again
Upvotes: 2