You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.
I am calling the wizard fragment from my one activity. Currently I only use one Activity for all views using the following getSupportFragmentManager().beginTransaction() .replace(R.id.nav_container, new RegistrationWizard()) .commit();
This works fine the first time but if I call the wizard a second time it loads fine but on the click to next I get the following error. I did notice that on the sample you there was a call to finish(). I can't really do this as my app would be over. It looks like on the second call that getActivity() returns null.
Any thoughts on how to properly get this working or do I need todo something differant on the finish, I am currently just calling the following in onWizardComplete() .
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.support.v4.app.FragmentActivity.getSystemService(java.lang.String)' on a null object reference at org.codepond.wizardroid.WizardFragment.onStepChanged(WizardFragment.java:53) at org.codepond.wizardroid.layouts.BasicWizardLayout.onStepChanged(BasicWizardLayout.java:102) at org.codepond.wizardroid.Wizard$2.onPageScrollStateChanged(Wizard.java:117) at android.support.v4.view.ViewPager.dispatchOnScrollStateChanged(ViewPager.java:1873) at android.support.v4.view.ViewPager.setScrollState(ViewPager.java:460) at android.support.v4.view.ViewPager.smoothScrollTo(ViewPager.java:914) at android.support.v4.view.ViewPager.scrollToItem(ViewPager.java:623) at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:609) at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:570) at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:551)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am calling the wizard fragment from my one activity. Currently I only use one Activity for all views using the following
getSupportFragmentManager().beginTransaction() .replace(R.id.nav_container, new RegistrationWizard()) .commit();
This works fine the first time but if I call the wizard a second time it loads fine but on the click to next I get the following error. I did notice that on the sample you there was a call to finish(). I can't really do this as my app would be over. It looks like on the second call that getActivity() returns null.
Any thoughts on how to properly get this working or do I need todo something differant on the finish, I am currently just calling the following in onWizardComplete() .
getActivity().getSupportFragmentManager().beginTransaction().remove(this).commit();
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.support.v4.app.FragmentActivity.getSystemService(java.lang.String)' on a null object reference at org.codepond.wizardroid.WizardFragment.onStepChanged(WizardFragment.java:53) at org.codepond.wizardroid.layouts.BasicWizardLayout.onStepChanged(BasicWizardLayout.java:102) at org.codepond.wizardroid.Wizard$2.onPageScrollStateChanged(Wizard.java:117) at android.support.v4.view.ViewPager.dispatchOnScrollStateChanged(ViewPager.java:1873) at android.support.v4.view.ViewPager.setScrollState(ViewPager.java:460) at android.support.v4.view.ViewPager.smoothScrollTo(ViewPager.java:914) at android.support.v4.view.ViewPager.scrollToItem(ViewPager.java:623) at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:609) at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:570) at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:551)
The text was updated successfully, but these errors were encountered: