Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot register twice successively #41

Open
elhexx opened this issue May 3, 2018 · 4 comments
Open

Cannot register twice successively #41

elhexx opened this issue May 3, 2018 · 4 comments

Comments

@elhexx
Copy link

elhexx commented May 3, 2018

i got this message error when i try to register twice successively :

java.lang.NullPointerException: Attempt to invoke interface method 'void shem.com.materiallogin.DefaultRegisterView$DefaultRegisterViewListener.onRegister(android.support.design.widget.TextInputLayout, android.support.design.widget.TextInputLayout, android.support.design.widget.TextInputLayout)' on a null object reference at shem.com.materiallogin.DefaultRegisterView$1.onClick(DefaultRegisterView.java:67) at android.view.View.performClick(View.java:4780) at android.view.View$PerformClick.run(View.java:19866) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

@shem8
Copy link
Owner

shem8 commented May 3, 2018

WDYM by twice? like clicking twice?

@elhexx
Copy link
Author

elhexx commented May 3, 2018

if i submit registration for user1, and when i try to submit new registration for user2, the previous error will occured.

@shem8
Copy link
Owner

shem8 commented May 4, 2018 via email

@elhexx
Copy link
Author

elhexx commented May 4, 2018

Also if i registred a new user, the login button doesn't work like if it is disabled, so i must restart the application the login.

final MaterialLoginView login = (MaterialLoginView) findViewById(R.id.login);

        ((DefaultLoginView)login.getLoginView()).setListener(new DefaultLoginView.DefaultLoginViewListener() {
            @Override
            public void onLogin(TextInputLayout loginUser, TextInputLayout loginPass) {
                //Handle login
                login(loginUser.getEditText().getText().toString(), loginPass.getEditText().getText().toString());
            }
        });

((DefaultRegisterView)login.getRegisterView()).setListener(new DefaultRegisterView.DefaultRegisterViewListener() {
            @Override
            public void onRegister(TextInputLayout registerUser, TextInputLayout registerPass, TextInputLayout registerPassRep) {
                //Handle register
                register(registerUser.getEditText().getText().toString(),
                        registerPass.getEditText().getText().toString(),
                        registerPassRep.getEditText().getText().toString());

            }
        });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants