title: Flickering of bitmap on canvas in android
body: <p>How to avoid image flickering when drawing on canvas.
  Below code keep on running for images.The next image comes sliding from top but the previous image keep on flickering at back.I just want the previous image to become static.</p>
  
  <pre><code>void drawscreen()
  {
      SurfaceHolder holder = getSurfaceHolder();
      try
      {
          Backgroundcanvas = holder.lockCanvas();
          if (Backgroundcanvas != null)
          {
              if (top == true)
              { slide_from_top(); }
          }
      }
      finally
      {
          if (Backgroundcanvas != null)
              holder.unlockCanvasAndPost(Backgroundcanvas);
      }
  
      mHandler.removeCallbacks(mUpdateDisplay);
      if (mVisible &amp;&amp; count)
      {
          mHandler.postDelayed(mUpdateDisplay, interval);
          count = false;
      }
      else
      {
          mHandler.postDelayed(mUpdateDisplay, 100);
      }
  }
  </code></pre>