1

I am trying to create a watermark text to my custom view, but the problem is when I scroll the canvas, I am unable to determine the exact co-ordinates of the screen's center. I tried tracking the onTouchEvent and getting the co-ordinates, but still it is not smooth, it appears on touching the screen during scroll and not always centered. Is there any way to keep a drawtext out of the scroll?

Mal
  • 373
  • 4
  • 15

1 Answers1

1

You can use a framelayout which has to layers. The base one will be the view which scrolls and the top layer will be the textview that has a gravity center. In that case the textview will not be scroll when the base view is scrolled.

blessanm86
  • 31,439
  • 14
  • 68
  • 79