How can I draw a circle over an image at a point where user touch the image.
The image is set using imageview.
I have found one solution on net which creates image bitmap on new canvas and draws circle over it (solution found at http://joerg-richter.fuyosoft.com/?p=120) Something like
ImageView imageView = (ImageView) findViewById (R.id.image1);
myBitmap = BitmapFactory.decodeResource(getResources(), drawid);
Paint myCircPaint = new Paint();
tempBitmap = Bitmap.createBitmap(bitmapXht, bitmapYht, Bitmap.Config.ARGB_8888);
Canvas tempCanvas = new Canvas(tempBitmap);
tempCanvas.drawBitmap(myBitmap, 0, 0, null);
myCircPaint.setStrokeWidth(5);
tempCanvas.drawCircle(evX, evY, 15, myCircPaint);
imageView.setImageDrawable(new BitmapDrawable(getResources(), tempBitmap));
This works but since I am drawing circle with every touch it draws everything everytime. How can I avoid drawing the main image everytime. Is it possible to retain the canvas across multiple touch events.
I am still new to Android so please excuse if this is something very simple