TextView-setCompondDrawables用法

Drawable drawable = mContext.getResources().getDrawable(R.drawable.duringtime);

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

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

//必须设置图片大小,否则不显示

原文地址:https://www.cnblogs.com/jkx1229761162/p/4863455.html