Android putting all my canvas drawing into another class?
<p>I am delving into the art of android and canvas and I have everything up and running and a little project I am working on! I have created a framework for a canvas loop to display animation the part where I draw to the canvas is as follows;</p>

<pre><code>// DRAW TO THE CANVAS
@Override
public void onDraw(Canvas canvas) {
    // CLEAR CANVAS
    canvas.drawColor(Color.YELLOW);
    androidMan.draw(canvas);
            circle.draw(canvas);
            square.draw(canvas);
}
</code></pre>

<p>All of the 3 objects appear and everything works fine. As I am new to both java and android I would like to put those 3 draw statements into a seperate class if possible so I can have the <code>onDraw</code> look something like,</p>

<pre><code>// DRAW TO THE CANVAS
@Override
public void onDraw(Canvas canvas) {
    // CLEAR CANVAS
    canvas.drawColor(Color.YELLOW);
    renderCanvas();
}
</code></pre>

<p>And within render canvas something like </p>

<pre><code>androidMan.draw(canvas);
            circle.draw(canvas);
            square.draw(canvas);
</code></pre>

<p>But when I do this it doesn't work and the app fails to load on my phone, thanks even if the question is stupidly thick! If possible I would like <code>renderCanvas</code> to be its own file.</p>
