
I am working on a project that involves painting on images.
To delete the unwanted lines or curves i have to draw a border and X button to delete it.
I have a relative layout where i have the freehand drawing canvas. on edit mode i should make them as u see in the pic, where i have to create button on a varying x,y positions.
i am confused how to achieve this.
Thanks in advance.
Jana.
I suggest doing this manually rather than using the
Buttonwidget. Override theonTouchEventon the view holding your painting and useMotionEvent.getXandMotionEvent.getYin combination withMotionEvent.getActionto determine behaviour when the user touches the ‘button’. Skipping widget creation will improve performance and open up doors to other types of functionality.