Code example for Region

Methods: getBounds

0
 
    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(); 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE