如何在 Android 模拟器上捏缩放?

How to pinch zoom on Android emulator?(如何在 Android 模拟器上捏缩放?)

本文介绍了如何在 Android 模拟器上捏缩放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,我需要在其中实现图像编辑,其中还包括捏缩放.我完成了捏缩放,但我只能在设备上测试它,而不是在模拟器上.

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.

有没有什么方法可以在android模拟器中测试捏缩放,有什么快捷键或者其他方法吗?

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

推荐答案

从 ADT 17 开始,可以使用物理 Android 4.0 设备向模拟器发送多点触控手势.在此处查看 Android 的说明.

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.

多点触控

模拟器支持多点触控输入,作为 r17 中的一项实验性功能,使用运行 SdkControllerMultitouch 应用程序的绑定 Android 设备.该应用程序包含一个监控触摸输入并将其发送到模拟器的活动.这需要 Android 4.0 或更高版本的系统映像.该活动显示模拟器屏幕的内容以帮助进行交互.建议在模拟器设置的开发者部分启用显示触摸",以查看触摸的确切发送位置.

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.

SdkControllerSensor应用源码位于

The SdkControllerSensor application source code is located in

$SDK/tools/apps/SdkControllerMultitouch/

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

这篇关于如何在 Android 模拟器上捏缩放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:如何在 Android 模拟器上捏缩放?

基础教程推荐