i have an imageview in my xml file and i want to put another image over it where user clicks.
i have used a canvas to place an image where user clicks but i am stuck when it comes to putting the canvas over my imageview.
Or is there any way around when we want to put another image over an imageview while detecting user clicks?
Thanks
i have an imageview in my xml file and i want to put another
Share
Since you’re already overriding a
Viewmethod, I would say have that draw the image rather than anImageView. YouronDraw()method would essentially be:EDIT:
Alternatively, if you want to keep the
ImageViewbecause of the convenient scaletypes, then you can override aFrameLayout. Place theImageViewinside of it, then override thedraw()method to draw a bitmap.