Canvas to ImageView problem in Android
<p>I want to display Canvas contents on ImageView in android,</p>

<p>but ImageView displaying blank.</p>

<pre><code>Bitmap imgBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.image);
Canvas canvas = new Canvas();
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);

canvas.drawBitmap(imgBitmap, 0, 0, paint);

paint.setColor(Color.BLACK);
paint.setAlpha(100);
canvas.drawRect(0, 0, 100, 100, paint); // transparent black on image

imgView.draw(canvas);
</code></pre>

<p>what is the problem? and what should I do?</p>
