Is it possible to resize the canvas in android?
<p>[android]
I have a LinearLayout which contains 2 views, 1st is imageView and th 2nd one have canvas on it.
if I do mLinearLayout.addView(i); and then mLinearLayout.addView(c); it shows both but if I do it in reverse oder (mLinearLayout.addView(c) and then mLinearLayout.addView(i)) the it only shows canvas.
I wanted to share the screen between these 2 views. Can anybody help me on this?</p>

<pre><code>@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mLinearLayout = new LinearLayout(this);

    mLinearLayout.setBackgroundColor(0xff74AC23);
    ImageView i = new ImageView(this);
    View c = new DrawView(this);

    i.setImageResource(R.drawable.bol_groen);
    i.setAdjustViewBounds(true); 

    mLinearLayout.addView(i);
    mLinearLayout.addView(c);
    setContentView(mLinearLayout);

}
</code></pre>

<p>}</p>

<p>public class DrawView extends View {</p>

<pre><code>private ShapeDrawable mDrawable;

public DrawView(Context context) {
    super(context);
    setFocusable(true); //necessary for getting the touch events

    mDrawable = new ShapeDrawable(new OvalShape());
    mDrawable.getPaint().setColor(0xff74AC23);
    mDrawable.setBounds(x, y, x + width, y + height);

}

@Override protected void onDraw(Canvas canvas) {

    canvas.drawColor(0xFFCCCCCC);
    mDrawable.draw(canvas);
</code></pre>

<p>}</p>
