The FormFragment feature only works in the same activity, because if we use a FragmentPagerAdapter and a TabLaoyout with Tabs loses formcontroller and marks a null data and complete activity stops.
In the application I have 3 tabs in the first everything works fine, but in the next 2 error appears as null.
The error related is:
FATAL EXCEPTION: main
Process: com.github.dkharrat.nexusdialog.sample, PID: 32144
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.github.dkharrat.nexusdialog.FormElementController.refresh()' on a null object reference
at com.github.dkharrat.nexusdialog.FormController$1.propertyChange(FormController.java:248)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:396)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:88)
at com.github.dkharrat.nexusdialog.FormModel.setValue(FormModel.java:62)
at com.github.dkharrat.nexusdialog.controllers.EditTextController$1.afterTextChanged(EditTextController.java:202)
at android.widget.TextView.sendAfterTextChanged(TextView.java:8017)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:10178)
at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1043)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:560)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:492)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:491)
at android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:685)
at android.view.inputmethod.BaseInputConnection.setComposingText(BaseInputConnection.java:445)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:340)
at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:78)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
The FormFragment feature only works in the same activity, because if we use a FragmentPagerAdapter and a TabLaoyout with Tabs loses formcontroller and marks a null data and complete activity stops.
In the application I have 3 tabs in the first everything works fine, but in the next 2 error appears as null.
The error related is:
FATAL EXCEPTION: main Process: com.github.dkharrat.nexusdialog.sample, PID: 32144 java.lang.NullPointerException: Attempt to invoke virtual method 'void com.github.dkharrat.nexusdialog.FormElementController.refresh()' on a null object reference at com.github.dkharrat.nexusdialog.FormController$1.propertyChange(FormController.java:248) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:396) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:88) at com.github.dkharrat.nexusdialog.FormModel.setValue(FormModel.java:62) at com.github.dkharrat.nexusdialog.controllers.EditTextController$1.afterTextChanged(EditTextController.java:202) at android.widget.TextView.sendAfterTextChanged(TextView.java:8017) at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:10178) at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1043) at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:560) at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:492) at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:491) at android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:685) at android.view.inputmethod.BaseInputConnection.setComposingText(BaseInputConnection.java:445) at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:340) at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:78) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5443) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)