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


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

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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM