有什么方法可以在 Android Emulator 上测试多点触控吗?

Is there any way to test multi-touch on the Android Emulator?(有什么方法可以在 Android Emulator 上测试多点触控吗?)

本文介绍了有什么方法可以在 Android Emulator 上测试多点触控吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以在 Android Emulator 上测试多点触控事件吗?或者有什么方法可以在没有实际设备的情况下进行测试?我正在使用 2.0 sdk,想用两根手指测试放大/缩小.

Can multi-touch events be tested on the Android Emulator? Or is there any way to test this without an actual device? I am using the 2.0 sdk and want to test zoom-in/zoom-out with two fingers.

推荐答案

更新:

是的,现在有(不是针对 2.x Android,而是针对最新版本).

Yes, now there is (not for the 2.x Android, but the latest ones).

如果人们仍在使用此功能进行搜索,如果您正在使用android studio 的默认模拟器,ma​​c 用户可以持有命令按钮,对于windows/linux,我相信它是alt按钮,而用鼠标左键单击 - HendraWD

In case people still searching with this function, if you are using default emulator from android studio, for mac user you can hold command button, and for windows/linux i believe it is alt button while left clicking with your mouse – HendraWD

对于 Linux,它是 Ctrl + 左键单击(不过,我不知道它在 Windows 上是否相同,所以 HendraWD 可能是正确的)

And for Linux, it's Ctrl + left click (however, I don't know if it's the same on Windows, so HendraWD may be right about that one)

另外,您可以做的另一件事(使用 Android 4.0+)是将触摸事件通过一个设备传送到模拟器中.如果您只有一台设备,但想在其他版本/尺寸的 Android 上测试相同的触摸事件,这将很有帮助.(参见http://tools.android.com/tips/hardware-emulation)

Plus another thing you can do (with Android 4.0+) is pipe touch events through one device into the emulator. This is helpful if you only have one device, but would like to test those same touch events on other versions/dimensions of Android. (See http://tools.android.com/tips/hardware-emulation)

无论如何,这些只是变通方法,如果多点触控对您的应用很重要,我仍然建议您带着笔记本电脑前往 Android 开发者用户组并寻求帮助以现场测试您的应用.您的开发人员伙伴可以对此非常有帮助.

In any case, these are just workarounds, if multitouch is important for your app, I would still recommend that you go to an Android Developer user group with your laptop and ask for help to test your app on the spot. Your fellow developers can be super helpful with this.

在我的小组中,我们一直共享手机(尤其是因为我们大多数人并不拥有所有不同的 Android 手机).如果您所在地区没有 Android 用户组,假设您居住在足够大的大都市地区,请考虑自己建立这样的组.您很可能不是唯一需要这些帮助的人.

In my groups, we share phones all the time (especially since most of us don't own all the different Android handsets out there). And if you don't have an Android user group in your area, assuming you live in a large enough metropolitan area, consider possibly starting such a group yourself. You're most likely not the only one who will need help with this stuff.

这篇关于有什么方法可以在 Android Emulator 上测试多点触控吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:有什么方法可以在 Android Emulator 上测试多点触控吗?

基础教程推荐