Code example for Region

Methods: containssetPath

    public boolean contains(float x, float y) {
        rectF = new RectF();
        path.computeBounds(rectF, true);
        Region region = new Region();
        region.setPath(path, new Region((int) rectF.left, (int), (int) rectF.right, (int) rectF.bottom));
        return region.contains((int) x, (int) y);
    public void clean() { 
        p = null;
        path = null;
        rectF = null;
Connect your IDE to all the code out there  Get Codota for Java