title: Draw a circle on bitmap
body: <p>I have searched for many answers here for drawing a circle on bitmap using canvas. However, I got some error in the code and the application stopped without any exception.</p>
  
  <p>Can anyone give me some help? It works fine with I create a blank bitmap and draw a circle on it.
  Any help will be appreciated!</p>
  
  <pre><code>Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.main);
  
  Paint paint = new Paint();
  //paint.setAntiAlias(true);
  paint.setColor(Color.BLUE);
  
  Canvas canvas = new Canvas(bmp);
  canvas.drawCircle(50, 50, 10, paint);
  
  ImageView imageView = (ImageView)findViewById(R.id.imageView1);
  //imageView.setAdjustViewBounds(true);
  imageView.setImageBitmap(bmp);
  </code></pre>