Coder Social home page Coder Social logo

nexusdialog's People

Contributors

aveuiller avatar danielgruber avatar dkharrat avatar meghaditya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nexusdialog's Issues

Failed to implement formFragment in Tablayout and Tabs, Please help

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.

How to Enable and disable the controls

Como abilitar y desabilitar los controles.

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.

right to left

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?

Refresh section or formcontroller

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?

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 ?

fragmentForm Feature implementation

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

FormFragment not function in pageadapter and tablayout

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

Error when implemented in a TabLayout and tabs

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.

Fragment Feature in Tablayout an FragmentPagerAdapter implementation

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

Library maintenance

I'm planning to use this library but I saw that there are no commits recently. Is it still maintained?
Thanks

Changing text/underline color

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?

RequiredFieldValidator for SelectionController

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

Changing selection options after Async task?

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?

Crash on screen rotation with SelectionController.

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.

Fragment Feature Error

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.

No checkboxes ?

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?

removeElement no effect

https://github.com/dkharrat/NexusDialog/blob/88978bdb58f81230d2c3778509b09fcce2bfce69/nexusdialog/src/main/java/com/github/dkharrat/nexusdialog/controllers/FormSectionController.java

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());
}

fragmentForm feature 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

Adding button to view

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?

custome font

hei, thank for awesome library
can i use custome font for editext hint?

FormFragment Tablayout and Pageradapter implementatio error

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.

tabbed screen and form fragment cause a null object reference, please helpme

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)

La aplicacon tiene tres fragments que derivan de fragmentform, cada fragmentform tiene campo texto, campo texto , select field, and checkboxes,

Anexo Imagenes,

Muchas gracias
frag1
frag2
frag3
frag4

Enable and disable controls

Good afternoon, the library is excellent and works very well, there is some way to enable and disable the controls.
Thank you.

Fragment Feature not function in tabbed application

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)

FormFragment feature only works in the same activity

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)

Default value on SelectionController?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.