Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling setCompoundDrawables() doesn't display the Compound Drawable

After I call the setCompoundDrawables method, the compound Drawable is not shown..

Drawable myDrawable = getResources().getDrawable(R.drawable.btn); btn.setCompoundDrawables(myDrawable, null, null, null); 

Any thoughts?

like image 351
hunterp Avatar asked Jul 06 '11 02:07

hunterp


1 Answers

I needed to be using setCompoundDrawablesWithIntrinsicBounds.

like image 123
hunterp Avatar answered Sep 20 '22 12:09

hunterp