public static ViewGroup buildStickyDrawerItemFooter ( Context ctx , DrawerBuilder drawer , View . OnClickListener onClickListener ) { //create the container view final LinearLayout linearLayout = new LinearLayout ( ctx ) ; linearLayout . setLayoutParams ( new LinearLayout . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , ViewGroup . LayoutParams . WRAP_CONTENT ) ) ; linearLayout . setOrientation ( LinearLayout . VERTICAL ) ; //set the background color to the drawer background color (if it has alpha the shadow won't be visible) linearLayout . setBackgroundColor ( UIUtils . getThemeColorFromAttrOrRes ( ctx , R . attr . material_drawer_background , R . color . material_drawer_background ) ) ; //create the divider if ( drawer . mStickyFooterDivider ) { addStickyFooterDivider ( ctx , linearLayout ) ; } fillStickyDrawerItemFooter ( drawer , linearLayout , onClickListener ) ; return linearLayout ; }
build the sticky footer item view