Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SuppressWarnings("StatementWithEmptyBody")
- @Override
- public boolean onNavigationItemSelected(@NonNull MenuItem item) {
- // Handle navigation view item clicks here.
- int id = item.getItemId();
- if (id == R.id.activity_one) {
- Intent intent = new Intent(this, ActivityOne.class);
- this.startActivity(intent);
- } else if (id == R.id.activity_two) {
- Intent intent = new Intent(this, ActivityTwo.class);
- this.startActivity(intent);
- } else if (id == R.id.activity_tree) {
- Intent intent = new Intent(this, ActivityThree.class);
- this.startActivity(intent);
- } else if (id == R.id.nav_share) {
- } else if (id == R.id.nav_send) {
- }
- DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
- drawer.closeDrawer(GravityCompat.START);
- return true;
- }
Add Comment
Please, Sign In to add comment