TextView動態設置圖片

Drawable drawable = getResources().getDrawable(R.drawable.bg);
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());// 設置邊界
// param 左上右下
tv.setCompoundDrawables(drawable,null,null,null);
相關文章
相關標籤/搜索