Ejemplo n.º 1
0
  @Override
  public void onClick(View v) {
    switch (v.getId()) {
      case R.id.bScanLabel:
        startActivity(new Intent(this, ScanLabelActivity.class));
        break;

      case R.id.bMyWearables:
        Intent intent = new Intent(this, MyWearablesActivity.class);
        intent.putExtra("owner", userLocalStore.getLoggedUser().name);
        startActivity(intent);
        break;

      case R.id.bMyFriends:
        startActivity(new Intent(this, MyFriendsActivity.class));
        break;

      case R.id.bLogout:
        logout();
        break;
    }
  }
Ejemplo n.º 2
0
 private void logout() {
   userLocalStore.clearUserData();
   userLocalStore.setUserLogged(false);
   finish();
 }