title: translate canvas and offset actionbar
body: <p>Please bear with me if this isn't clear, this is my first posting here.</p>
  
  <p>I'm drawing a couple of lines on a canvas and trying to translate the canvas to centre the lines on the screen. The trouble is, I have an actionbar (using actionbarsherlock) which I want to exclude from the translation i.e. I want the top of the view to be under the action bar.</p>
  
  <p>As it is, the data is centred vertically on the whole screen height, but I want it to be centred vertically only on the visible part of the canvas under the action bar.</p>
  
  <p>Any ideas of the best way to achieve this?</p>
  
  <pre><code>@Override
  protected void onDraw(Canvas canvas) {
      Paint paint = mPaint;
  
      paint.setAntiAlias(true);
      paint.setColor(Color.WHITE);
      paint.setStyle(Paint.Style.FILL);
  
  
      int centrew = canvas.getWidth()/2;
      int centreh = canvas.getHeight()/2;
  
      canvas.translate(centrew, centreh);
      canvas.drawLine(0, -5, 0, 5, mPaint);
      canvas.drawLine(5, 0, -5, 0, mPaint);
  
  }
  </code></pre>