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.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This was not possible before API 9/Android 2.3/Gingerbread. The method
MotionEvent#obtaincan be used to create aMotionEventcontaining multiple pointers, which you can then dispatch to your views for testing. (Remember torecycle()theMotionEventwhen you’re done with it.)