给一个控件上面设置图片(drawableTop),并可以设置图片的大小

来源:互联网 发布:php给图片加文字水印 编辑:程序博客网 时间:2024/05/21 05:36
    Drawable drawable=getResources().getDrawable(R.drawable.xx); //获取图片  drawable.setBounds(left, top, right, bottom);  //设置图片参数  xx.setCompoundDrawables(null,drawable,null,null);  //设置到控件的上面
0 0
原创粉丝点击