Android drawableleft drawableTop 设置图片的大小

来源:互联网 发布:三国志11 mod 知乎 编辑:程序博客网 时间:2024/06/10 00:34

例子:

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

0 0
原创粉丝点击