Code example for Region

Methods: getBounds

    public Rect getRectWithDefaultMargins(Region region){
        Rect rect = new Rect();
        rect.set(region.getBounds().left + DEFAULT_MARGIN,
                 region.getBounds().top + DEFAULT_MARGIN,
                 region.getBounds().left + region.getBounds().width() - DEFAULT_MARGIN,
                 region.getBounds().top + region.getBounds().height() - DEFAULT_MARGIN);
        return rect;
    public abstract void draw(Canvas canvas, Paint paint);
    public abstract void onTouchEvent(int x, int y, int action);
    public abstract void reset(); 
Connect your IDE to all the code out there  Get Codota for Java