android - 如何复制并粘贴到 Xamarin Android Player?

标签 android android-emulator xamarin

在 iOS 模拟器中我会

在桌面文本中 命令+C

在模拟器中 命令+V

长按

然后选择粘贴

但是,这似乎不是 Xamarin Android 模拟器中的一个选项。

最佳答案

更新:请务必注意,Xamarin Android Player 现已弃用一段时间,因此建议您继续使用 Google 自己的模拟器。

iOS 模拟器共享 OS X 剪贴板,而您正在运行的应用程序实际上是在您的 Mac 上 native 运行的 OS X 应用程序。

Android 模拟器更类似于虚拟机并且往往具有更高的隔离性 - Xamarin Android Player 基于 VirtualBox。

由于它基于 VirtualBox,您可以打开 VirtualBox 应用程序并调整您正在使用的 Android 设备的设置。有一个共享剪贴板的选项:

VirtualBox settings

虽然这似乎对模拟器没有任何影响。

您可以改为使用 adb:

adb shell 输入键盘文字“你好”

然而,这将只允许您发送单个单词。要发送多个单词,您必须用 %s 替换空格:

adb shell 输入键盘文本“hello%sworld”

因此,要使其真正有用,您必须围绕它编写一个小实用程序来替换空格。

Google 自己的 AVD 也不支持复制和粘贴,但其他第 3 方选项如 GenyMotion做。

关于android - 如何复制并粘贴到 Xamarin Android Player?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28056680/

相关文章:

android - 截图

android - 如何在Android模拟器上模拟速度?

visual-studio - 适用于 Android 的 Visual Studio 模拟器 - Hyper-V 无法启动

c# - 更新依赖包时强制更新包版本

ios - 在 xamarin.forms 中为 IOS 自定义选项卡式页面时遇到问题

android - AlarmManager.setExact() 启动时间错误?

android - android :configChanges in AndroidManifest. xml 缺少 adActivity

java - 如何排除空指针异常?

android - 使用 handler.postDelayed 获取剩余时间

android - 如何使用 MvvmCross 将 Android TextView 绑定(bind)到 Click 事件