title: Adding a canvas to a relative layout
body: <p>Currently I am writing a program that is supposed to add an image to a canvas and then add that canvas to a relative layout. The problem that I am having is that when I call this the layout is displayed but the canvas is not drawn on the layout.</p>
  
  <pre><code>canvas = (RelativeLayout) findViewById(R.id.canvasLayout);                  
  imageCanvas = new Canvas();
  mainImage = BitmapFactory.decodeResource(getResources(), R.drawable.image);
  
  imageCanvas.drawBitmap(mainImage, 50, 50, null);
  
  imageCanvas.drawColor(Color.BLACK);
  canvas.draw(imageCanvas);
  </code></pre>
  
  <p>That is the code that is attempting to add the image to the canvas and then the canvas to the layout.</p>
  
  <p>I am completely lost as to what to do to attempt to fix this.</p>