dkharrat / nexusdialog Goto Github PK
View Code? Open in Web Editor NEWLibrary that allows you to easily and quickly create forms in Android with little code
License: Apache License 2.0
Library that allows you to easily and quickly create forms in Android with little code
License: Apache License 2.0
Hi,
I would like to set a default text using the Edit Text Controller. Is that possible?
Good afternoon
Nexusdialog is an excellent library, and functions ok when all the controls are in the same activity, but not when implementing a screen with tabs, when wanting to capture information in the controls appears an error and leaves the application.
Appendix screens of the application type and files of code and logcat
AlumtFragment.txt
AlumgFragment.txt
AlumFragment.txt
FragActivity.txt
Uploading logcat.txt…
Unlike in other controllers, refresh is not called in CheckBoxController after adding all elements.
Good afternoon.
This library is great.
But when implementing the new formFragment feature in a Tablayout, viewpargeradapter and tabs, I get an error when I try to capture in the form's controls, a null error, either in the text or in the select.
There is some special way for this feature to work correctly in the viewpageradapter and tablayout tab.
Thank you.
Other than adding a global style to every EditText in your app, how can we change the look of individual EditTexts in a form?
how to create TextInputLayout by using this library
Buenos dias, la libreria es genial y aun mas con las modificaciones que se han hecho ultimamente, quisiera saber como puedo abilitar y desabilitarlos controles y si tienen algun ejemplo, gracias y saludos.
When I want to use FormFragment in an activity with a FragmentPagerAdapter, this feature does not work because it sends me an error message when I try to capture information in the TABS The message is: there is a null value, thanks
How can i clear all elements value?
Hello,
could you please tell me how to change direction of controls?
For example i would like to set direction of EditTextController to right to left . is it possible?
Hi,
I need to add elements asynchronusly, so when I add en element to section then call section.refresh(). it gives null pointer exception. Stack trace is below
java.lang.NullPointerException
at com.github.dkharrat.nexusdialog.controllers.SelectionController.refresh(SelectionController.java:114)
at com.github.dkharrat.nexusdialog.controllers.SelectionController.createFieldView(SelectionController.java:108)
at com.github.dkharrat.nexusdialog.controllers.LabeledFieldController.getFieldView(LabeledFieldController.java:104)
at com.github.dkharrat.nexusdialog.controllers.LabeledFieldController.createView(LabeledFieldController.java:129)
at com.github.dkharrat.nexusdialog.FormElementController.getView(FormElementController.java:65)
at com.github.dkharrat.nexusdialog.controllers.SelectionController.getSpinner(SelectionController.java:72)
at com.github.dkharrat.nexusdialog.controllers.SelectionController.refresh(SelectionController.java:133)
at com.github.dkharrat.nexusdialog.controllers.FormSectionController.refresh(FormSectionController.java:183)
How to dynamically add new elements? for example on PropertyChangeListener.
PropertyChangeListener type = new PropertyChangeListener() {
@OverRide
public void propertyChange(PropertyChangeEvent event) {
Object type = getModel().getValue("type");
if (type.equals("new")) {
section.addElement(new EditTextController(context, "test", "First name", "Change me"));
getFormController().refreshElements();
}
}
};
getModel().addPropertyChangeListener("type", type);
i am getting null pointer exception Can you help me ?
Good afternoon.
Could someone help me implement the FormFragment feature in a TabLayout and a PagerAdapter.
When wanting to do it marks me a null error, when changing of TAB.
Thank you so much
I have problems in implementing the new feature formFragment because by putting them in a PageAdapter and tablayout only displays the first page but the other tabs are blank, they could help me make the right implementation, thanks
For example, if using a ViewPager to switch between sections of the form it would be necessary to be able to add form sections and elements in each Fragment, rather than the Activity.
Hello
How do I update pre-made element SelectionController items?
Hi, how are you.
Nexusdialog is a very good tool, and I have implemented simple forms in my application but now I require a more complex form, can someone help me to implement this tool in an application with tabs and tabslayout, I could not do it since implementing it marks me error At the time of capture in the elements of the form.
The error is a null and when changing tab in the application all the controls are filled with the same data
Thank you very much.
The new feature of management of fragments is great, only to be used with a tablayout and FragmentPagerAdapter to put TABS, this does not work because only the first form in the first TAB is displayed in the following TABS is not displayed the form, these are blank.
Could you tell me how to implement the new feature with TabLayou and FragmentPagerAdapter, Many Thanks and Regards
How can i create a custom date picker like day wise month wise and year wise insted of your library picker
for DOB selecting
I'm planning to use this library but I saw that there are no commits recently. Is it still maintained?
Thanks
Hi,
I am wondering how it's possible to add an element to a FormSectionController in asynctask post execute thread after receiving data from a server.
I've look through entire code, couldn't find a simple way to change color to white (from black). Is kind of stupid to create custom element just to change color, or is it really the only way?
Hello
I think there is a bug in RequiredFieldValidator in use with SelectionController.
new SelectionController(context, id, label, isMandatory, x,y, false);
So a selection is required.
But in RequiredFieldValidator at the following line
if (value == null || (value instanceof String && TextUtils.isEmpty((String) value))) {
value is "0".
But it should not be a String "0". It should be an int zero.
Is my implementation wrong or did i found a bug?
Greets
I'm loading a SelectionController with an empty array:
section2.addElement(new SelectionController(this, "pet", "pet", true, "Loading...", new ArrayList<String>(), true));
Then I perform a background operation to grab a list from the internet. How do I then update that element dynamically with the new options to choose?
The application crash on a screen rotation When a SelectionController is in the currently shown Form with an EditTextController or a SearchableSelectionController, with the Error:
com.github.dkharrat.nexusdialog.sample E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.github.dkharrat.nexusdialog.sample, PID: 7355
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.github.dkharrat.nexusdialog.sample/com.github.dkharrat.nexusdialog.sample.SimpleExample}: java.lang.ClassCastException: android.widget.TextView$SavedState cannot be cast to android.widget.Spinner$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
[...]
Caused by: java.lang.ClassCastException: android.widget.TextView$SavedState cannot be cast to android.widget.Spinner$SavedState
at android.widget.Spinner.onRestoreInstanceState(Spinner.java:762)
[...]
The value of SPINNER_ID
and EDIT_TEXT_ID
seems to be mixed-up on the redraw (I don't really see why though), so changing the value of SPINNER_ID
will solve the problem.
Greetings.
I solved the problem when I put the form in a fragment and used in a TabLayout and FragmenPageAdapter now displayed correctly, but when change page and want to capture information in a EditTexController or get in NEXT SelectionController error:
FATAL EXCEPTION: main
Process: com.github.dkharrat.nexusdialog.sample, PID: 15596
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.github.dkharrat.nexusdialog.FormElementController.refresh ()' on a null object reference
com.github.dkharrat.nexusdialog.FormController at $ 1.propertyChange (FormController.java:247)
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)
com.github.dkharrat.nexusdialog.controllers.EditTextController at $ 1.afterTextChanged (EditTextController.java:195)
at android.widget.TextView.sendAfterTextChanged (TextView.java:8017)
android.widget.TextView at $ 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)
com.android.internal.view.IInputConnectionWrapper at $ 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)
com.android.internal.os.ZygoteInit at $ MethodAndArgsCaller.run (ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:618)
As to the change of product loses all FormManager content.
Alguin could help.
Greetings.
Hi,
That's a useful library, but as far as I can tell, it doesn't provide checkboxes, which are quite standard in a form. Is there a specific reason behind it or only that you didn't implement it?
How can i create a custom date picker like day wise month wise and year wise insted of your library picker
for DOB selecting
public FormElementController removeElement(FormElementController element) {
return elements.remove(element.getName());
}
maybe need to add orderedElements.remove(element);
or just change to
public FormElementController removeElement(FormElementController element) {
return removeElement(element.getName());
}
I am getting this error
Good Afternoon.
Could you help me with the following error please.
FragmentForm property causes an error when using it with a FragmentPagerAdapter and a TabLayou and change Tab.
The error is a null as I show in the following text.
Com.github.dkharrat.nexusdialog.sample E / AndroidRuntime: FATAL EXCEPTION: main
Process: com.github.dkharrat.nexusdialog.sample, PID: 2385
## 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
I for some reason can't figure out how to add a button to the view. Is there a way I can add a "submit" button to the bottom of the form?
hei, thank for awesome library
can i use custome font for editext hint?
Good afternoon.
It's good to have changed NexusDialog to handle fragments, when testing started to use it in a Tablayou and PagerAdapter, so far I could not make it work properly, adding the fragments to the tabs of tablayout, only the first TAB display properly, the rest does not display the form is left blank, could make an example of the proper implementation in tablayout and pageradapter, thank you very much.
Can anybody help me please
I have an application in which I use the new feature fragmentform in a tabbed screen, on each tab I have textbox, select, datepicker, checkboces. Which implements with NexusDialog. When running the application everything works fine but when I want to capture information in the form fields, it sends me an error which I describe below.
FATAL EXCEPTION: main
Process: com.github.dkharrat.nexusdialog.sample, PID: 6159
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)
Anexo Imagenes,
Good afternoon, the library is excellent and works very well, there is some way to enable and disable the controls.
Thank you.
i want to set the form section view textview style
How to set checkbox values checked using formController.getModel().setValue() method
I i have added checkbox control with 4 values, but it always display 2 checkbox.
How to create a custom layout for spinner ?
The feature FormFragment only works if you set it on the same page of the activity, when I use tabLayout and FragmentPagerAdapter tabbed this does not work because when changing TAB, and want to use the controls, causes a null value and the application stops function.
Example I have three fragments with different controls when changing tab and want to capture information in a text or change value in a picker marks the next error.
FATAL EXCEPTION: main
Process: com.github.dkharrat.nexusdialog.sample, PID: 28643
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:247)
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:195)
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)
the getmodel() method return null as model in initForm and so we cannot initialize fields !!!!!
Is it possible to load list of custom objects into SearchableSelectionController instead of just List?
Thanks.
Is there a way to set default value on Selection controller without calling getSpinner - set position?
getModel().setValue("fieldName", "value") is not working on Selection Controller.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.