设置TextView的drawableLeft图片和文字之间的padding
待整理
1 | //设置drawableTOP图片和文字之间的padding |
xml中使用1
2Related XML Attributes
android:drawablePadding
代码中设置drawableLeft/Top/Bottom/Right1
2
3Drawable drawableLeft = mContext.getResources().getDrawable(R.drawable.goods_prompt);
drawableLeft.setBounds(0, 0, drawableLeft.getIntrinsicWidth(), drawableLeft.getIntrinsicHeight());
viewHolder.good_profits.setCompoundDrawables(drawableLeft,null,null,null);