0

I am editing an image and I must select a sector, for that I must be able to create forms using the touch and then paint that area

Here is an example of an edit app

enter image description here

rojiTOCH
  • 29
  • 4

1 Answers1

1

You must get touch position with something like this on your image view

@Override
public boolean onTouchEvent(MotionEvent event) {
    int x = (int)event.getX();
    int y = (int)event.getY();
return false;
}

Then you can add a custom view programmatically overriding onDraw method. You can find a good example here

Community
  • 1
  • 1
firegloves
  • 5,187
  • 2
  • 22
  • 42