ColorMatrixColorFilter颜色过滤

来源:互联网 发布:java软件程序员工资 编辑:程序博客网 时间:2024/05/18 03:32
Drawable mDrawable = context.getResources().getDrawable(R.drawable.face_icon);     //Make this drawable mutable.     //A mutable drawable is guaranteed to not share its state with any other drawable.     mDrawable.mutate();     ColorMatrix cm = new ColorMatrix();     cm.setSaturation(0);     ColorMatrixColorFilter cf = new ColorMatrixColorFilter(cm);     mDrawable.setColorFilter(cf);

0 0
原创粉丝点击