not able to pinch zoom on emulator

前端 未结 14 1486
生来不讨喜
生来不讨喜 2021-01-31 13:34

I have an application in which I need to implement image editing, which also includes pinch zooming. I am done with pinch zooming but I can test this only on device, not on emul

14条回答
  •  情话喂你
    2021-01-31 13:48

    Since ADT 17, it is possible to use a physical Android 4.0 device to send multitouch gestures to the emulator.See Android's instructions here.

    Multi-Touch

    The emulator supports multi-touch input, as an experimental feature in r17, using a tethered Android device running the SdkControllerMultitouch application. The application contains an activity that monitors touch inputs and sends them to the emulator. This requires an Android 4.0 or later system image. The activity displays the content of the emulator screens to help with interactivity. It is recommended to enable "show touches" in the Developer section of the Settings on the emulator to see exactly where the touches are sent.

    The SdkControllerSensor application source code is located in

    $SDK/tools/apps/SdkControllerMultitouch/

    But this is still a workaround since we need a real device. My advice would be to test your app directly on a real device as it's more robust, and even more performant.

提交回复
热议问题