code: 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();
              }
          }
      }
docs: Set the button graphic to a given Drawable
  
  @param d The Drawable to use as the button graphic