I have tried the solution suggested here Android: How to overlay-a-bitmap/draw-over a bitmap?. I seems to work but I obtained a slightly disoriented image from it.
I have set my edit icon to toggle between start and stop drawing on canvas. When the user stops drawing, I retrieve the canvas bitmap and the imageView and overlay canvas bitmap on the imageView. As can be seen from the screenshots, the imageView is the laptop image and canvas bitmap is the up arrow I drew. Here is my overlay function.
private Bitmap overlay(Bitmap bmp1, Bitmap bmp2) {
Bitmap bmOverlay = Bitmap.createBitmap(bmp1.getWidth(), bmp1.getHeight(), bmp1.getConfig());
Canvas canvas = new Canvas(bmOverlay);
canvas.drawBitmap(bmp1, new Matrix(), null);
canvas.drawBitmap(bmp2, new Matrix(), null);
return bmOverlay;
}
I am new to android and would appreciate some help in this regard. Thanks!