1

Possible Duplicate:
Detect multitouch with Ontouch listener Android

I have a question about detecting touches. This is any method in android to detect if user touch screen one finger or two at the same time? I have image view and I would like to know that I touch that picture one or two fingers

Community
  • 1
  • 1
user1302569
  • 7,131
  • 13
  • 46
  • 66

1 Answers1

1

The same View.onTouch(View, MotionEvent) you use for the touch detection. The MotionEvent object has the getPointerCount(), that will return the number of pointers of data contained in this event. If it retunrns a value > 1, you have a multitouch. It requires at least Android 5

Blackbelt
  • 156,034
  • 29
  • 297
  • 305