protected void toggleSelectionList ( Context ctx ) { if ( mDrawer != null ) { //if we already show the list. reset everything instead if ( mDrawer . switchedDrawerContent ( ) ) { resetDrawerContent ( ctx ) ; mSelectionListShown = false ; } else { //build and set the drawer selection list buildDrawerSelectionList ( ) ; // update the arrow image within the drawer mAccountSwitcherArrow . clearAnimation ( ) ; ViewCompat . animate ( mAccountSwitcherArrow ) . rotation ( 180 ) . start ( ) ; //mAccountSwitcherArrow.setImageDrawable(new IconicsDrawable(ctx, MaterialDrawerFont.Icon.mdf_arrow_drop_up).sizeRes(R.dimen.material_drawer_account_header_dropdown).paddingRes(R.dimen.material_drawer_account_header_dropdown_padding).color(ColorHolder.color(mTextColor, ctx, R.attr.material_drawer_header_selection_text, R.color.material_drawer_header_selection_text))); mSelectionListShown = true ; } } }
helper method to toggle the collection