Shortcut: Pinch to Zoom in Android Emulator
Also, pinch to zoom with one finger in Android
This is known to work with Android Marshmallow. I have not tried this with other versions, but I have tried it on Bluestacks emulator as well as physical devices.
Problem: Can’t Pinch to Zoom in Android Emulator
When you do Android development, running an emulator is a necessity. In the emulator, the mouse simulates a touch event. Unfortunately, using only a mouse, you can’t “pinch to zoom” in or out. Although some laptop panels and computer monitors support touch input, this is expensive, and not a guaranteed solution.
Solution: Tap then Drag
Remember that the left mouse button simulates a virtual finger touching the display…
- Tap: Click the mouse button (quickly press, then release the left mouse button)
- Drag: Press the left mouse button and hold it down. Move the mouse to a desired location, then release the left mouse button.
In quick succession, Tap, then Drag
Zoom Out
Starting at the bottom-middle of the display, tap, then drag up to the upper-right.
Zoom In
Starting at the upper-right of the display, tap, then drag down to the bottom-middle.
Caveats
- This is known to work with applications that let you pan in both directions, such as Google Maps
- Although this effect seems to be built in to the OS, it might be difficult to trigger this effect in applications that explicitly scroll in one direction (such as vertical only).
- This approach might not work with applications that implement their own custom multi-touch logic.