コード例 #1
0
  public UnFollowButton(String coachID, View profileView, Activity activity) {
    this.profileView = profileView;

    this.activity = activity;
    this.coachIndex = coachID;

    UserDatabase info = new UserDatabase(activity);
    info.open();
    String[][] data = info.getData();
    info.close();

    myindex = data[0][1];
  }
コード例 #2
0
  public CheckBattle(String coachID, View profileView, Activity activity) {
    this.profileView = profileView;

    this.activity = activity;
    this.coachIndex = coachID;

    UserDatabase info = new UserDatabase(activity);
    info.open();
    String[][] data = info.getData();
    info.close();
    // check login
    String[][] loginData = new LoginHelper().checkLogin(activity);
    generatedLoginItem = generateData(loginData);

    if (generatedLoginItem.toString() != "[]") {

      myindex = data[0][1];

    } else {

      Intent i = new Intent(activity, LoginActivity.class);
      activity.startActivity(i);
    }
  }