Guest User

Untitled

a guest
Apr 23rd, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. @SuppressWarnings("StatementWithEmptyBody")
  2. @Override
  3. public boolean onNavigationItemSelected(@NonNull MenuItem item) {
  4. // Handle navigation view item clicks here.
  5. int id = item.getItemId();
  6.  
  7. if (id == R.id.activity_one) {
  8.  
  9. Intent intent = new Intent(this, ActivityOne.class);
  10.  
  11. this.startActivity(intent);
  12.  
  13. } else if (id == R.id.activity_two) {
  14.  
  15. Intent intent = new Intent(this, ActivityTwo.class);
  16.  
  17. this.startActivity(intent);
  18.  
  19. } else if (id == R.id.activity_tree) {
  20.  
  21. Intent intent = new Intent(this, ActivityThree.class);
  22.  
  23. this.startActivity(intent);
  24.  
  25. } else if (id == R.id.nav_share) {
  26.  
  27. } else if (id == R.id.nav_send) {
  28.  
  29. }
  30.  
  31. DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
  32. drawer.closeDrawer(GravityCompat.START);
  33. return true;
  34. }
Add Comment
Please, Sign In to add comment