public void setButtonDrawable ( Drawable d ) { if ( drawable != d ) { if ( drawable != null ) { drawable . setCallback ( null ) ; unscheduleDrawable ( drawable ) ; } drawable = d ; if ( d != null ) { d . setCallback ( this ) ; //d.setLayoutDirection(getLayoutDirection()); if ( d . isStateful ( ) ) { d . setState ( getDrawableState ( ) ) ; } d . setVisible ( getVisibility ( ) == VISIBLE , false ) ; setMinHeight ( d . getIntrinsicHeight ( ) ) ; updateButtonTint ( ) ; } } }
Set the button graphic to a given Drawable