Throws the following exception
06-14 18:52:59.176 17502-17502/org.eyeseetea.surveillance_cnm_dev I/System.out: Exception info: Error loading new survey, null navigation controllerAttempt to invoke virtual method 'void org.eyeseetea.malariacare.layout.adapters.survey.navigation.NavigationController.first()' on a null object reference
06-14 18:52:59.176 17502-17502/org.eyeseetea.surveillance_cnm_dev W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.eyeseetea.malariacare.layout.adapters.survey.navigation.NavigationController.first()' on a null object reference
at org.eyeseetea.malariacare.layout.adapters.survey.DynamicTabAdapter.initNavigationController(DynamicTabAdapter.java:200)
at org.eyeseetea.malariacare.layout.adapters.survey.DynamicTabAdapter.(DynamicTabAdapter.java:147)
at org.eyeseetea.malariacare.fragments.SurveyFragment.showSurvey(SurveyFragment.java:216)
at org.eyeseetea.malariacare.fragments.SurveyFragment.initializeSurvey(SurveyFragment.java:196)
at org.eyeseetea.malariacare.fragments.SurveyFragment.onCreateView(SurveyFragment.java:104)
at android.app.Fragment.performCreateView(Fragment.java:2352)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:995)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
at android.app.BackStackRecord.run(BackStackRecord.java:815)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1580)
06-14 18:52:59.177 17502-17502/org.eyeseetea.surveillance_cnm_dev W/System.err: at android.app.FragmentManagerImpl$1.run(FragmentManager.java:483)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
Turning this issue into a refactor. The idea is to remove the use of static contexts anywhere in the app, so probably we could do it also in the DynamicTabAdapter as well
Throws the following exception 06-14 18:52:59.176 17502-17502/org.eyeseetea.surveillance_cnm_dev I/System.out: Exception info: Error loading new survey, null navigation controllerAttempt to invoke virtual method 'void org.eyeseetea.malariacare.layout.adapters.survey.navigation.NavigationController.first()' on a null object reference 06-14 18:52:59.176 17502-17502/org.eyeseetea.surveillance_cnm_dev W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.eyeseetea.malariacare.layout.adapters.survey.navigation.NavigationController.first()' on a null object reference at org.eyeseetea.malariacare.layout.adapters.survey.DynamicTabAdapter.initNavigationController(DynamicTabAdapter.java:200) at org.eyeseetea.malariacare.layout.adapters.survey.DynamicTabAdapter.(DynamicTabAdapter.java:147)
at org.eyeseetea.malariacare.fragments.SurveyFragment.showSurvey(SurveyFragment.java:216)
at org.eyeseetea.malariacare.fragments.SurveyFragment.initializeSurvey(SurveyFragment.java:196)
at org.eyeseetea.malariacare.fragments.SurveyFragment.onCreateView(SurveyFragment.java:104)
at android.app.Fragment.performCreateView(Fragment.java:2352)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:995)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
at android.app.BackStackRecord.run(BackStackRecord.java:815)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1580)
06-14 18:52:59.177 17502-17502/org.eyeseetea.surveillance_cnm_dev W/System.err: at android.app.FragmentManagerImpl$1.run(FragmentManager.java:483)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)