Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. switch (id){
  2.  
  3. case 1 :
  4. preferences = getSharedPreferences("MY_PREFS", Context.MODE_PRIVATE);
  5. SharedPreferences.Editor editor = preferences.edit();
  6.  
  7. editor.putInt("is_auth",0);
  8.  
  9. editor.apply();
  10.  
  11. Intent intent1 = new Intent(MainActivity.this,LoginActivity.class);
  12. intent1.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  13. startActivity(intent1);
  14. break;
  15.  
  16. case 1 :
  17. Intent intent2 = new Intent(MainActivity.this,AboutActivity.class);
  18. startActivity(intent2);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement