Android设置drawableleft图片大小,当然了,也可以同时设置drawableRight, drawableTop drawableBottom,本例子只设置drawableleft,代码如下:
Drawable drawable = getResources().getDrawable(R.drawable.iv_img); //图片宽度和高度 drawable.setBounds(0,0,30,30); //把图片设置在左边 tv_textView.setCompoundDrawables(drawable,null,null,null); //左上右下