var exclusionRects = listOf(rect1, rect2, rect3)
fun onLayout( changedCanvas: Boolean, left: Int, top: Int, right: Int, bottom: Int) { // Update rect bounds and the exclusionRects list setSystemGestureExclusionRects(exclusionRects) }
fun onDraw(canvas: Canvas) { // Update rect bounds and the exclusionRects list setSystemGestureExclusionRects(exclusionRects) }