Skip to content

Fix Orientation change crash on Tablets. #18

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

Merged
merged 1 commit into from
Sep 12, 2016
Merged

Fix Orientation change crash on Tablets. #18

merged 1 commit into from
Sep 12, 2016

Conversation

ItsCalebJones
Copy link

@ItsCalebJones ItsCalebJones commented Sep 12, 2016

On Tablets greater then 7"s on the second orientation change the fragment would not be null however would not be added to the fragment manager causing a crash.

09-11 20:08:40.180 6675-6675/de.mrapp.android.preference.activity.example E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                            Process: de.mrapp.android.preference.activity.example, PID: 6675
                                                                                            java.lang.IllegalStateException: Fragment IntroductionPreferenceFragment{10220286} is not currently in the FragmentManager
                                                                                                at android.app.FragmentManagerImpl.putFragment(FragmentManager.java:568)
                                                                                                at de.mrapp.android.preference.activity.PreferenceActivity.onSaveInstanceState(PreferenceActivity.java:2653)
                                                                                                at android.app.Activity.performSaveInstanceState(Activity.java:1298)
                                                                                                at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1288)
                                                                                                at android.app.ActivityThread.callCallActivityOnSaveInstanceState(ActivityThread.java:3958)
                                                                                                at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3921)
                                                                                                at android.app.ActivityThread.access$900(ActivityThread.java:151)
                                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1309)
                                                                                                at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                                at android.os.Looper.loop(Looper.java:135)
                                                                                                at android.app.ActivityThread.main(ActivityThread.java:5254)
                                                                                                at java.lang.reflect.Method.invoke(Native Method)
                                                                                                at java.lang.reflect.Method.invoke(Method.java:372)
                                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
                                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

@michael-rapp michael-rapp self-assigned this Sep 12, 2016
@michael-rapp michael-rapp merged commit fefaaed into michael-rapp:master Sep 12, 2016
@michael-rapp
Copy link
Owner

Thank you for the contribution!

@michael-rapp
Copy link
Owner

This is included in the latest bugfix release 4.2.7.

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

Successfully merging this pull request may close these issues.

2 participants