private void logUserIn(User returnedUser) { userLocalStore.storeUserData(returnedUser); checkBox = (CheckBox) findViewById(R.id.checkBox); boolean checked = checkBox.isChecked(); if (checked) { userLocalStore.setUserLoggedIn(true); Log.d("tag1", "checked"); } // should go to the profile page but going ot the register page temporarily startActivity(new Intent(this, DonationHistory.class)); finish(); }
@Override public void onClick(View v) { switch (v.getId()) { case R.id.bLogin: String username = etUsername.getText().toString(); String password = etPassword.getText().toString(); User user = new User(username, password); authenticate(user); // user logged in and store it userLocalStore.storeUserData(user); userLocalStore.setUserLoggedIn(true); break; case R.id.tvRegisterLink: // start activity when clicked startActivity(new Intent(this, Register.class)); break; } }
private void logUserIn(User returnedUser) { userLocalStore.storeUserData(returnedUser); userLocalStore.setUserLoggedIn(true); startActivity(new Intent(this, MainActivity.class)); }