Drawable drawable = context.getDrawable(R.drawable.***); //(API 21以上才能使用此方法)
//或者:Drawable drawable = context.getResource().getDrawable(R.drawable.***);
drawable.setBounds(0,0,width,height); //width即为你需要设置的图片宽度,height即为你设置的图片的高度
tv.setCompoundDrawables(null,null,drawable,null);