Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pinch zoom on Android emulator?

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 emulator.

Is there any way for testing pinch zooming in android emulator, any shortcut key or any other way?

like image 963
vipin Avatar asked Apr 05 '12 06:04

vipin


People also ask

How do you zoom out on Android emulator map?

Two ways you can do: Press and hold Ctrl then press click button (mouse/trackpad) and move up/down to zoomin/zoomout. Double click and hold second click then move (mouse/trackpad) up/down to zoomin/zoomout.


2 Answers

With a mouse:

Press and hold Ctrl and press and hold left mouse and while doing that move your mouse.

With a trackpad:

Press and hold Ctrl and press and hold your trackpad and move with a finger to the LEFT and RIGHT (not up and down).

like image 122
yowbro Avatar answered Sep 29 '22 04:09

yowbro


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.

like image 36
K_Anas Avatar answered Sep 29 '22 06:09

K_Anas