Search code examples
androidandroid-actionbaractionbarsherlock

Screen rotation bug in actionbar


Hello everyone I am new in Sherlock Actionbar I am having a very strange problem in my sample application. The problem is that when I rotate to landscape from the portrait its behavior is normal but when I rotate back to portrait mode the layout does not change back to portrait mode.

Below are the screen shot of the problem I am facing.

OriginalScreen enter image description here

Did rotation to Landscape enter image description here

Again rotated back to original orientation i.e. Portrait Mode enter image description here

As you can see that on the third picture the problem I am facing.

I am using the latest version of ActionbarSherlock library.

Edited My manifest File

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.actionbar_sherlockexample"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.example.actionbar_sherlockexample.MainActivity"
        android:theme="@style/Theme.Sherlock"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>

Thanks


Solution

  • This is an issue with emulator . If you will run it on real device , it will work fine .