Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android navigation drawer open activity

navigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
        @Override
        public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
             int id=menuItem.getItemId();    
             if (id == R.id.xxx){
                  Intent newIntent = new Intent(this, NewActivity.class);
                  startActivity(newIntent);  
              }
              return true;
         }
      });
 
PREVIOUS NEXT
Tagged: #android #navigation #drawer #open #activity
ADD COMMENT
Topic
Name
2+5 =