HoldingDrawable.java 文件源码

java
阅读 40 收藏 0 点赞 0 评论 0

项目:HoldingButton 作者:
public void setCancelIcon(Bitmap bitmap) {
    if (bitmap != null) {
        mCancelIconWidth = bitmap.getWidth();
        mCancelIconHeight = bitmap.getHeight();
        mCancelIconShader = new BitmapShader(bitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
        mCancelIconShader.setLocalMatrix(mCancelIconMatrix);
        mCancelIconPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
        mCancelIconPaint.setShader(mCancelIconShader);
        mCancelIconPaint.setColorFilter(new PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.SRC_IN));

        invalidateSelf();
    } else {
        mCancelIconWidth = 0;
        mCancelIconHeight = 0;
        mCancelIconMatrix = null;
        mCancelIconPaint = null;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号