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?
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?
Use This (I tested). It works good
For me setCompoundDrawablesWithIntrinsicBounds(Drawable, Drawable, Drawable, Drawable) did not work.
I had to use setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0).
It is deprecated in API 22.
This code is useful for me: