I am trying to set the foreground image on an image button. After some research, I came across this code sample:
I know this is an old question, but for future searches... I believe what you are looking for is:
imgButton.setImageDrawable(drawable);