title: Drawing a rectangle in center of the screen
body: <p>please see the following code. I want draw a rectangle in center of the screen.But it draws a rectangle in the left corner.</p>
  
  <pre><code>protected  void onDraw(Canvas canvas) {
          paint.setColor(Color.GREEN);
          canvas.drawRect(getLeft()/2,getTop()/2,getRight()/2,getBottom()/2,paint);
          super.onDraw(canvas);
      }
  </code></pre>