Drawable drawable=getResources().getDrawable(R.drawable.xx); //获取图片
drawable.setBounds(left, top, right, bottom); //设置图片参数
xx.setCompoundDrawablesRelativeWithIntrinsicBounds(
null
,all,
null
,
null
); //设置到哪个控件的位置()
图片与文字距离 :属性android:drawablePadding=""
![](https://images2015.cnblogs.com/blog/677455/201610/677455-20161020093350951-1464286283.png)