alexgolec
alexgolec

Reputation: 28272

Is it possible to unit test multitouch on android?

I've been trying to make a unit test for an application I'm writing. I want to test the graphics performance on various zoom operations, but I can't seem to figure out how to send events that contain two pointers.

Upvotes: 3

Views: 369

Answers (1)

adamp
adamp

Reputation: 28932

This was not possible before API 9/Android 2.3/Gingerbread. The method MotionEvent#obtain can be used to create a MotionEvent containing multiple pointers, which you can then dispatch to your views for testing. (Remember to recycle() the MotionEvent when you're done with it.)

Upvotes: 4

Related Questions