i m using a progress button library https://github.com/leandroBorgesFerreira/LoadingButtonAndroid for loginbutton ,when i am trying to create user by clicking this button in firebase i got belows errors
i found same error here java.lang.IllegalArgumentException : Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull but i am not able to get it
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter bitmap
at br.com.simplepass.loadingbutton.customViews.CircularProgressButton.doneLoadingAnimation(Unknown Source:2)
at com.choudhary.apnidukan.LoginActivity$1$1.onComplete(LoginActivity.java:82)
my loginActivity
public class LoginActivity extends AppCompatActivity {
EditText email, password, confirmpassword;
FirebaseAuth firebaseAuth;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
firebaseAuth = FirebaseAuth.getInstance();
final CircularProgressButton btn = (CircularProgressButton) findViewById(R.id.btn_id);
email = findViewById(R.id.edit_text_email);
password = findViewById(R.id.edit_text_password);
confirmpassword = findViewById(R.id.edit_confirmPassword);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (TextUtils.isEmpty(email.getText().toString())) {
email.setError("Email is must");
return;
}
if (TextUtils.isEmpty(password.getText().toString())) {
password.setError("Password is must");
return;
}
if (TextUtils.isEmpty(confirmpassword.getText().toString())) {
confirmpassword.setError("Password not Matched");
return;
}
if (!password.getText().toString().trim().equals(confirmpassword.getText().toString().trim())) {
confirmpassword.setError("Password not matched");
return;
}
String EMAIL = email.getText().toString();
String PASSWORD = password.getText().toString();
btn.startAnimation();
final Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.ic_baseline_check_24);
firebaseAuth.createUserWithEmailAndPassword(EMAIL, PASSWORD).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
btn.doneLoadingAnimation(R.color.colorPrimaryDark, bitmap);
Intent in = new Intent(LoginActivity.this, mainDrawerActivity.class);
startActivity(in);
finish();
} else {
btn.revertAnimation();
Toast.makeText(LoginActivity.this, task.getException().getLocalizedMessage(), Toast.LENGTH_SHORT).show();
btn.stopAnimation();
}
}
});
}
});
}
}