ERNICommunity / erni-moods-android

Android ERNI moods app (Hack Sessions)
0 stars 0 forks source link

Fragment not attached when selecting MoodHistoryFragment #30

Closed elgrangrifon45 closed 9 years ago

elgrangrifon45 commented 9 years ago

When I select the tab for the mood history, the app crashes with the stack trace shown below. Somehow the Fragment ist not attached to the activity.

I don't know whether this is connected to my changes in #31.

10-27 21:25:10.753 6316-6316/android.community.erni.ernimoods W/System.err﹕ java.lang.IllegalStateException: Fragment MoodHistoryFragment{4230a188} not attached to Activity 10-27 21:25:10.763 6316-6316/android.community.erni.ernimoods W/System.err﹕ at android.app.Fragment.getResources(Fragment.java:844) 10-27 21:25:10.763 6316-6316/android.community.erni.ernimoods W/System.err﹕ at android.app.Fragment.getString(Fragment.java:866) 10-27 21:25:10.763 6316-6316/android.community.erni.ernimoods W/System.err﹕ at android.community.erni.ernimoods.controller.MoodHistoryFragment.(MoodHistoryFragment.java:62) 10-27 21:25:10.763 6316-6316/android.community.erni.ernimoods W/System.err﹕ at android.community.erni.ernimoods.controller.EntryPoint.onTabSelected(EntryPoint.java:290) 10-27 21:25:10.763 6316-6316/android.community.erni.ernimoods W/System.err﹕ at com.android.internal.app.ActionBarImpl.selectTab(ActionBarImpl.java:577) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at com.android.internal.app.ActionBarImpl$TabImpl.select(ActionBarImpl.java:1105) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at com.android.internal.widget.ScrollingTabContainerView$TabClickListener.onClick(ScrollingTabContainerView.java:547) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at android.view.View.performClick(View.java:4470) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at android.view.View$PerformClick.run(View.java:18593) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at android.os.Handler.handleCallback(Handler.java:733) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:95) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at android.os.Looper.loop(Looper.java:157) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5867) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:674) 10-27 21:25:10.773 6316-6316/android.community.erni.ernimoods W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)

maomam commented 9 years ago

Ok I solved it. Can you check it out?

maomam commented 9 years ago

I have some problems with import in mymoodhistory, hope that others do not have such issues.

elgrangrifon45 commented 9 years ago

Could you describe the issue somewhat more detailed? Also an explanation about the resolution would be nice. Thank you for your work!

maomam commented 9 years ago

It was actually SimpleDate format problem. I put that string with date format "YYYY MM DD" etc. in resource strings file when i externalized strings. But that did not work, so i put it into Simple Date format directly and that worked now. If it works at your device also then we can close this issue?

elgrangrifon45 commented 9 years ago

Works. Thank you! :+1: