其他分享
首页 > 其他分享> > android :RadioButton 加载图片过大问题

android :RadioButton 加载图片过大问题

作者:互联网

RadioButton[] rb = new RadioButton[3];
rb[0] = rb_home;
rb[1] = rb_setting;
rb[2] = rb_me;
for(RadioButton r:rb){
Drawable[] drawables = r.getCompoundDrawables();
Rect rect = new Rect(0,0,drawables[1].getMinimumWidth()/3,drawables[1].getMinimumHeight()/3);
drawables[1].setBounds(rect);
r.setCompoundDrawables(null , drawables[1] , null ,null);
}

标签:drawables,RadioButton,rb,new,android,null,rect,加载
来源: https://www.cnblogs.com/wang-jingyuan/p/15100251.html