N
N
Nikita2017-02-18 20:17:11
Java
Nikita, 2017-02-18 20:17:11

How to redraw SurfaceView after touching the screen?

Hello! I need to write an application in which when you click on the screen, the screen color changes to a different one. How can I make it so that when the screen is touched (OnTouchEvent) the SurfaceView is redrawn (starts a new thread)?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Chvarkov, 2017-02-19
@snitron

If I understand correctly, then you do not need to start a new thread, but you need to change the color you draw in an existing thread. For example, keep a variable responsible for the color in the class and change its value when pressed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question