Problem of using surfaceTouchEvent
in
Android Processing
•
2 years ago
When I want to touch the screen and go to another activity, I used the following code:
@Override
public boolean surfaceTouchEvent(MotionEvent event) {
// pass string to anther activity
Intent intent = new Intent(TestPApplet.this, SurfFeaturePoint.class);
intent.putExtra("feature", imgpath);
startActivity(intent);
.
return super.surfaceTouchEvent(event);
}
However, when I only touched the screen once, it will triggered twice of another activity.
It should only trigger once for another activity.
Does anyone know what's the problem?
Thanks!
1