I have an image res/drawable/test.png (R.drawable.test). I want to pass this image to a function which accepts Drawable, e.g. mButton.set
res/drawable/test.png
Drawable
mButton.set
Your Activity should have the method getResources. Do:
Drawable myIcon = getResources().getDrawable( R.drawable.icon );