title: Android: How to draw a rect in a ImageView
body: <p>i need to draw a rect in the middle of an ImageView to create a CostumeCheckBox. Im new in Android and i have no idea to do this.
  The ImageView/CostumeCheckbox has a Border:</p>
  
  <pre><code>protected void onDraw(Canvas canvas) {
      super.onDraw(canvas);
  
      Rect rect = new Rect();
      Paint paint = new Paint();
      paint.setStyle(Paint.Style.STROKE);        
      paint.setColor(CheckboxBorderColor);        
      paint.setStrokeWidth(borderWidth);
      getLocalVisibleRect(rect);
      canvas.drawRect(rect, paint); }
  </code></pre>