Code example for ActionBarDrawerToggle

Methods: getSupportActionBar

0
                R.drawable.ic_drawer,  /* nav drawer image to replace 'Up' caret */ 
                R.string.drawer_open,  /* "open drawer" description for accessibility */ 
                R.string.drawer_close  /* "close drawer" description for accessibility */ 
        ) { 
            public void onDrawerClosed(View view) {
                getSupportActionBar().setTitle(mTitle);
 
            } 
 
            public void onDrawerOpened(View drawerView) {
                getSupportActionBar().setTitle(mDrawerTitle);
 
            } 
        }; 
        //set the drawer icon to be clickable 
        mDrawerLayout.setDrawerListener(mDrawerToggle);
 
        //first start opens the drawer 
        if (savedInstanceState == null) {
            mDrawerLayout.openDrawer(mDrawerList);
        }