Code example for Canvas

Methods: drawRectgetClipBounds

0
        setImageBitmap(mBitmap);
    } 
 
    @Override 
    public void draw(Canvas canvas) {
        super.draw(canvas);
        if (isChecked()) { 
            canvas.drawRect(canvas.getClipBounds(), mForegroundPaint);
        } 
    } 
 
    @Override 
    public boolean isChecked() { 
        return mIsChecked;
    } 
 
    @Override 
    public void setChecked(boolean checked) {
        mIsChecked = checked;
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE