Android AVD 键盘输入在 xUbuntu 操作系统上一直无法正常工作 [英] Android AVD keyboard input not working all the time on xUbuntu OS

查看:25
本文介绍了Android AVD 键盘输入在 xUbuntu 操作系统上一直无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 xubuntu 机器上有一个奇怪的行为,我不知道为什么.

I have a weird behavior on my xubuntu machine and I don't know why.

  1. 启动模拟器并在应用中创建一个 EditText.
  2. 点击 EditText 会弹出安卓键盘
  3. 点击我电脑硬件键盘上的按键,但在模拟器上没有输入.
  4. 现在这是奇怪的部分,点击模拟器设置的 3 点菜单:

  1. Start the emulator and have a EditText in the app.
  2. Tap on EditText and the android keyboard pops up
  3. Tap keys on my PC's hardware keyboard but no input on the emulator.
  4. Now here is the weird part, tap on the 3 dots menu of the emulator settings:

设置屏幕打开,例如位置设置,其中有一个经度输入字段.我关闭屏幕

The settings screen opens, for instance with the Locations setting which does have an input field for Longitude. I close the screen

所以,基本上只有在完成这些步骤之后,我才能使用键盘在模拟器中输入.如果我回到 Android Studio 并输入一些东西,当我返回模拟器时,它就不起作用了.如何让输入始终有效?

So, basically only after doing these steps I can input in the emulator using my keyboard. If I go back to Android Studio and type something, when I return to the emulator, it does not work. How can I make the input work all the time?

推荐答案

你看,主要的情况是Android Emulator Window即使你点击它也没有正确的焦点.是的,您可以进行任何触摸操作,但框架仍然显示为未聚焦.

You see, the main case is Android Emulator Window don't have the proper focus even when you click on it. Yes, you can do any touch-operations, but frame still appears non-focused.

我找到了一个解决方法:

  1. 转到您的窗口管理器
  2. 找到焦点标签
  3. 更改焦点模型 -> 焦点跟随鼠标"
  4. (可选) 应用适当的延迟(我已将其设为最低值)
  5. 禁用获得焦点时自动升起窗口"选项.
  1. Go to your Window Manager
  2. Find Focus tab
  3. Change Focus Model -> "Focus follow mouse"
  4. (Optional) Apply proper delay (I've put it to the lowest value)
  5. Disable "Automatically raise windows when they receive focus" option bellow.

现在,每当您将光标悬停在模拟器窗口上方时,它都会获得正确的聚焦状态,您就可以正常使用键盘了.

Now, whenever you hang your cursor above the emulator window it'll gain correct focusing state and you'd be able to use you keyboard just fine.

这篇关于Android AVD 键盘输入在 xUbuntu 操作系统上一直无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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