title: SurfaceView refresh in android
body: <p>I am working on an application which need to extend the SurfaceView. Now I meet some problems with the redraw of the view.</p>
  
  <p>For a normal android.view.View, I will override the <code>onDraw()</code> method, put all my graphic login inside this method . And call the <code>invalidate()</code> method when I want it redraw.</p>
  
  <p>But how about the SurfaceView ? It seems that <code>postInvalidate()</code> can be used to call its redraw. But where can I put the graphic logic? </p>
  
  <p>Should I put the graphci login to  <code>Surface.Callback.surfaceCreated()</code>? If so,when I call method <code>postInvalidate()</code>,does it will call the <code>surfaceCreated()</code> internally? If not, how to fix it?</p>