How to call onDraw after setContentView(R.layout.main)?
<p>I have something to draw at runtime. I did drawing in onDraw in MyView class.
Because, I already used  setContentView(R.layout.main) in onCreate, I cannot use it again.<br>
How to call onDraw after setContentView(R.layout.main)?</p>

<pre><code>public class MyActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main); // I have something to draw in XML also.
        MyView myView = new MyView(this);
        // setContentView(myView); I cannot use setContentView two times.
}
protected class MyView extends View {
    public MyView(Context context) {
        super(context);
    }
    public void onDraw(Canvas canvas) {
           // there are some drawing codes and these cannot be done in XML.
    }
}
</code></pre>
