//获取资源图片
Drawable leftDrawable = getResources().getDrawable(R.drawable.comment_parise);
//设置图片的尺寸,奇数位置后减前得到宽度,偶数位置后减前得到高度。
leftDrawable.setBounds(0, 0, 30, 30);
//设置图片在TextView中的位置
tvMain.setCompoundDrawables(leftDrawable, null, null, null);
Android-------设置TextView同时显示图片和文本,并控制图片大小
绳锯木断,水滴石穿。海纳百川,积少成多。一分耕耘,一份收获。