TextView 代码设置drawableLeft、drawab

2017-04-21  本文已影响82人  面条168

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

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

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

上一篇 下一篇

猜你喜欢

热点阅读