-1

I'm using:

@Override
    public boolean onTouchEvent(MotionEvent event) {

I'm using surfaceview.

But when I try:

if (event.getAction() == MotionEvent.ACTION_UP) {
    Log.d("STATE: ", "Up");

It is never called. What is the reason?

It is really annoying, because I want my player to move when I hold down the screen.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
carefacerz
  • 1,287
  • 3
  • 16
  • 27

1 Answers1

0

Ensure you are returning true return true; after you complete processing of the event (ACTION_UP in this case) and also returning super.onTouchEvent(event) for every other event (i.e. the default)?

source.rar
  • 8,002
  • 10
  • 50
  • 82