public void resetDrawerContent ( ) { if ( switchedDrawerContent ( ) ) { //set the new items setOnDrawerItemClickListener ( originalOnDrawerItemClickListener ) ; setOnDrawerItemLongClickListener ( originalOnDrawerItemLongClickListener ) ; setItems ( originalDrawerItems , true ) ; getAdapter ( ) . withSavedInstanceState ( originalDrawerState ) ; //remove the references originalOnDrawerItemClickListener = null ; originalOnDrawerItemLongClickListener = null ; originalDrawerItems = null ; originalDrawerState = null ; //if we switch back scroll back to the top mDrawerBuilder . mRecyclerView . smoothScrollToPosition ( 0 ) ; //show the stickyFooter and it's shadow again if ( getStickyFooter ( ) != null ) { getStickyFooter ( ) . setVisibility ( View . VISIBLE ) ; } if ( getStickyFooterShadow ( ) != null ) { getStickyFooterShadow ( ) . setVisibility ( View . VISIBLE ) ; } //if we currently show the accountHeader selection list make sure to reset this attr if ( mDrawerBuilder . mAccountHeader != null && mDrawerBuilder . mAccountHeader . mAccountHeaderBuilder != null ) { mDrawerBuilder . mAccountHeader . mAccountHeaderBuilder . mSelectionListShown = false ; } } }
helper method to reset to the original drawerContent