Drawable drawable = mContext.getResources().getDrawable(R.drawable.duringtime);
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());//必须设置图片大小,否则不显示
holder.time.setCompoundDrawables(drawable, null, null, null);
Drawable drawable = mContext.getResources().getDrawable(R.drawable.duringtime);
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());//必须设置图片大小,否则不显示
holder.time.setCompoundDrawables(drawable, null, null, null);
本文标题:TextView setCompoundDrawables用法
本文链接:https://www.haomeiwen.com/subject/tccgattx.html
网友评论