We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Start program in landscape mode, turn to vertical, crash.
03-04 21:34:00.825: E/AndroidRuntime(27088): FATAL EXCEPTION: main 03-04 21:34:00.825: E/AndroidRuntime(27088): Process: com.codepath.caltraindating, PID: 27088 03-04 21:34:00.825: E/AndroidRuntime(27088): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.codepath.caltraindating/com.codepath.caltraindating.MainActivity}: java.lang.NullPointerException 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3738) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.app.ActivityThread.access$900(ActivityThread.java:135) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1202) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.os.Handler.dispatchMessage(Handler.java:102) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.os.Looper.loop(Looper.java:136) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.app.ActivityThread.main(ActivityThread.java:5017) 03-04 21:34:00.825: E/AndroidRuntime(27088): at java.lang.reflect.Method.invokeNative(Native Method) 03-04 21:34:00.825: E/AndroidRuntime(27088): at java.lang.reflect.Method.invoke(Method.java:515) 03-04 21:34:00.825: E/AndroidRuntime(27088): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 03-04 21:34:00.825: E/AndroidRuntime(27088): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 03-04 21:34:00.825: E/AndroidRuntime(27088): at dalvik.system.NativeStart.main(Native Method) 03-04 21:34:00.825: E/AndroidRuntime(27088): Caused by: java.lang.NullPointerException 03-04 21:34:00.825: E/AndroidRuntime(27088): at com.codepath.caltraindating.fragments.CheckinFragment.initRecentTrains(CheckinFragment.java:237) 03-04 21:34:00.825: E/AndroidRuntime(27088): at com.codepath.caltraindating.fragments.CheckinFragment.onCreateView(CheckinFragment.java:87) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:871) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1083) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1065) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1844) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:519) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.app.Activity.performStart(Activity.java:5241) 03-04 21:34:00.825: E/AndroidRuntime(27088): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2168) 03-04 21:34:00.825: E/AndroidRuntime(27088): ... 12 more
The text was updated successfully, but these errors were encountered:
Need to fix this by the method he mentioned in class, some or all of these:
landscape - onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState) } onRestoreInstanceState http://stackoverflow.com/questions/4096169/onsaveinstancestate-and-onrestoreinstancestate onPostCreate onConfigurationChange
Sorry, something went wrong.
Seems the listener is null out when the configuration (portrait - landscape) changes.
We could just force it to be portrait mode all the time as an easy fix (?)
That's a good idea
No branches or pull requests
Start program in landscape mode, turn to vertical, crash.
The text was updated successfully, but these errors were encountered: