例子:

  Drawable drawable=getResources().getDrawable(R.drawable.xx); //获取图片
  drawable.setBounds(left, top, right, bottom);  //设置图片参数
  xx.setCompoundDrawablesRelativeWithIntrinsicBounds(null,all,null,null);  //设置到哪个控件的位置()

Android drawableleft  drawableTop 设置图片的大小

 


差不多就是这样 上边从网上随便找的例子,可以看看~最好自己敲下试试

相关文章:

  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2022-01-10
  • 2022-01-23
  • 2022-12-23
猜你喜欢
  • 2021-06-09
  • 2021-08-05
  • 2022-12-23
  • 2021-09-17
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
相关资源
相似解决方案