I’m trying to draw a line over an ImageView but whenever I try it using Canvas, I have to reload the Bitmap, which is not my intention.
Is there a way to simply draw a line on an uploaded ImageView using Canvas without having to refresh the Image? Or another way to draw lines over Android ImageView?
I’m trying to draw a line over an ImageView but whenever I try it
Share
Or, if you want to be able to draw any lines (rects, ovals, etc), subclass ImageView into your own ImageView and do the drawing yourself.
And in your layout xml, don’t specify <ImageView …/>, but specify <com.mycompany.project.widget.MyImageView … /> instead.