@Override
    public boolean onTouchEvent(MotionEvent event) {
        if (mRegionClickListener != null) {

            if (event.getAction() == MotionEvent.ACTION_UP) {
                for (int i = 0; i < mRegions.size(); i++) {
                    VoronoiRegion region = mRegions.get(i);
                    if (region.contains(event.getX(), event.getY())) {
                        mRegionClickListener.onClick(this, i);
                        return false;
                    }
                }
            }
        }

        return true;
    }
Set layer-type HARDWARE or SOFTWARE for the view (true/false).

@param enabled True if should be hardware acceleration, false if should be software
vorolay/src/main/java/quatja/com/vorolay/VoronoiView.java