如何在Android模拟器上捏缩放? [英] How to pinch zoom on Android emulator?

查看:108
本文介绍了如何在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.com/tips/hardware-emulation"rel =" nofollow noreferrer>在此处查看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模拟器上捏缩放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆