Reputation: 12024
In my Android application, I have a bunch of meshes in a collection that are moving around in 3D space. I want something to happen to the mesh when any one of the moving mesh (objects) are touched. How can I detect which object has been tapped / clicked?
Upvotes: 9
Views: 6999
Reputation: 73484
In your View, you will need to override onTouchEvent() and determine if the touch event occurred on one of your objects. The Android Dev Blog has some examples on handling touch events.
Upvotes: 5