imagesbutton how to set background

Java
imageButton.setBackground(this.getDrawable(R.drawable.your_image));

Source

Also in Java: