Drawable drawable=getResources().getDrawable(R.drawable.xx); //获取图片

  drawable.setBounds(left, top, right, bottom);  //设置图片参数
  xx.setCompoundDrawablesRelativeWithIntrinsicBounds(null,all,null,null);  //设置到哪个控件的位置()
 
 
图片与文字距离 :属性android:drawablePadding=""

更改控件中DrawableLeft图片的大小,图片与文字的距离

相关文章:

  • 2021-10-23
  • 2022-12-23
  • 2021-04-05
  • 2021-04-13
  • 2022-12-23
  • 2021-10-26
  • 2022-01-07
  • 2022-12-23
猜你喜欢
  • 2021-06-09
  • 2022-12-23
  • 2021-03-31
  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2022-12-23
相关资源
相似解决方案