title: Why does my bitmap on the canvas appear below the background drawable?
body: <p>I have a <code>SurfaceView</code> where I'm setting a background color and an image like so:</p>
  
  <pre><code>BitmapDrawable tiledBackground = new BitmapDrawable(BitmapFactory.decodeResource(getResources(), R.drawable.background));
  tiledBackground.setTileModeX(Shader.TileMode.REPEAT);
  tiledBackground.setColorFilter(0xaacceeff, PorterDuff.Mode.DST_OVER);
  this.setBackgroundDrawable(tiledBackground);
  </code></pre>
  
  <p>I also have an animation thread where I'm drawing an image (successively adjusting its x coordinate so that it appears to move to the left). The background image is a transparent PNG and so some parts of it are transparent. It appears that the image I'm drawing from the thread appears <em>below</em> the background drawable on the <code>SurfaceView</code>. How can I have it appear on top of the background? I'm drawing the image like so:</p>
  
  <pre><code>private void doDraw(Canvas canvas) {
      canvas.drawColor(Color.BLACK);
      canvas.drawBitmap(missile, x, getHeight() - 95, paint);
      canvas.restore();
  }
  </code></pre>
  
  <p><code>missile</code> and <code>paint</code> are initialized in the constructor of the thread to:</p>
  
  <pre><code>missile = Bitmap.createBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.missile));
  paint = new Paint();
  </code></pre>