canvas.save(Canvas.CLIP_SAVE_FLAG); try { if (child == leftView) { canvas.clipRect(0, 0, splitPositionLeft, height); } else if (child == rightView) { canvas.clipRect(splitPositionRight, 0, width, height); } return super.drawChild(canvas, child, drawingTime); } finally { canvas.restore(); } } Clipping child Views