public void setCustomizedRightView ( View view ) { RelativeLayout . LayoutParams lp = makeLayoutParams ( view ) ; lp . addRule ( CENTER_VERTICAL ) ; lp . addRule ( ALIGN_PARENT_RIGHT ) ; getRightViewContainer ( ) . addView ( view , lp ) ; }
set customized view to right side