예제 #1
0
  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();
  }
예제 #2
0
파일: Login.java 프로젝트: dhurng/ODFapp
  @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;
    }
  }
예제 #3
0
파일: Login.java 프로젝트: dhurng/ODFapp
  private void logUserIn(User returnedUser) {
    userLocalStore.storeUserData(returnedUser);
    userLocalStore.setUserLoggedIn(true);

    startActivity(new Intent(this, MainActivity.class));
  }