@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; } }
private void logout() { userLocalStore.clearUserData(); userLocalStore.setUserLogged(false); finish(); }