Code example for Canvas

Methods: drawRGB

1
        } 
 
        @Override 
        protected void onDraw(Canvas canvas) {
            super.onDraw(canvas);
            canvas.drawRGB(0, 255, 0);
        } 
    } 
 
    static class DirtyBitmapView extends FrameLayout {
        private final Paint mPaint;
 
        DirtyBitmapView(Context c) {
            super(c);
            mPaint = new Paint();
        } 
 
        @Override 
        public void dispatchDraw(Canvas canvas) {
            canvas.drawRGB(255, 255, 255);