例子:
Drawable drawable=getResources().getDrawable(R.drawable.xx); //獲取圖片
drawable.setBounds(left, top, right, bottom); //設置圖片參數
xx.setCompoundDrawablesRelativeWithIntrinsicBounds(
null
,all,
null
,
null
); //設置到哪個控件的位置()

差不多就是這樣 上邊從網上隨便找的例子,可以看看~最好自己敲下試試