tags:

views:

24

answers:

0

I already have a TextView, but it's text is null and I set one setCompoundDrawables() into the TextView.

Drawable icon;
.....
mText.setText(null);
mText.setCompoundDrawables(null, null, null, icon);

And set padding to 0.

mText.setPadding(0, 0, 0, 0);
mText.setCompoundDrawablePadding(0);

It seems the null text alway occupy some space. I try to set padding to negative number, also not working. I cannot use ImageView in such situation. Any suggestion or sample ??