Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crash after device rotation #30

Open
TomasValenta opened this issue Sep 30, 2015 · 1 comment
Open

App crash after device rotation #30

TomasValenta opened this issue Sep 30, 2015 · 1 comment

Comments

@TomasValenta
Copy link
Contributor

Hello again Patrice,

after removing android:screenOrientation="portrait" from AndroidManifest, the app crashes after device rotation:

java.lang.RuntimeException: Unable to start activity ComponentInfo{ch.swissonid.design_samples/ch.swissonid.design_lib_sample.DrawerActivity}: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

I found some infos (Source 1, Source 2), do you have some experience with this problem?

@TomasValenta
Copy link
Contributor Author

Simple fix can be android:configChanges="orientation|screenSize"

<activity
    android:name=".DrawerActivity"
    android:label="@string/app_name"
    android:configChanges="orientation|screenSize
    >
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

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

in AndroidManifest file, but I am not sure with all consequences with this option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant