private void registerAccount() { if (!isEmpty()) { if(!toSame()) { if(!checkName()) { if(!checkEmail()) { mDatabaseHelper.addUser(editTextNameRegistration.getText().toString(), editTextSurnameRegistration.getText().toString(),editTextLoginRegistration.getText().toString(), editTextPasswordRegistration.getText().toString(), editTextPin.getText().toString(), editTextMailRegistration.getText().toString()); Toast.makeText(this, "Stworzono konto", Toast.LENGTH_SHORT).show(); Intent intent = new Intent(OpenRegistration.this, MainActivity.class); startActivity(intent); }else{ Toast.makeText(this, "Mail już użyty", Toast.LENGTH_SHORT).show();} } else { Toast.makeText(this, "Login już użyty", Toast.LENGTH_SHORT).show();} } else { Toast.makeText(this, "Różne hasła", Toast.LENGTH_SHORT).show();} } else { Toast.makeText(this, "Puste pola", Toast.LENGTH_SHORT).show();} }