Canvas text on Android canvas and change text afterwards

I created a costum view, and on onDrawMethod I started drawing some things. Several rectangles, lines and text.

  canvas.drawText("Hello",150,150, paint);

Now I want to change this text after OnTouchEvent.

My problem is that I do not know how to delete old text. At the moment, my second text, which is shown after TouchEvent, simply overlaps my old text. Should I redraw my hole with new text?

+3
source share
1 answer

, , , , , .

, .

+3

Source: https://habr.com/ru/post/1779870/


All Articles