I\'m using a Button
To do this, you can use the
setCompoundDrawables(...);
method. Be aware that comes with TextView, not Button.
This is how to use it:
Drawable img = getContext().getResources().getDrawable( R.drawable.yourimage);
img.setBounds( 0, 0, 60, 60 ); // set the image size
txtVw.setCompoundDrawables( img, null, null, null );
Taken from: How to programmatically set drawableLeft on Android button?