TextView 代码设置drawableLeft、drawableRight、drawableTop、drawableBottom

Drawable rightDrawable = getResources().getDrawable(R.drawable.icon_new);

rightDrawable.setBounds(0, 0, rightDrawable.getMinimumWidth(), rightDrawable.getMinimumHeight());

textview.setCompoundDrawables(null, null, rightDrawable, null);

你可能感兴趣的:(TextView 代码设置drawableLeft、drawableRight、drawableTop、drawableBottom)