简体   繁体   English

如何在android studio上的软键盘之间切换

[英]How to switch between soft keyboards on android studio

I am working on devices that I built some apps for.我正在为我构建了一些应用程序的设备上工作。 One of the apps requires no keyboard, but when a cursor focuses on an input (for scanning purposes) field, the softkeyboard shows up, but has no purpose so I decided to download this "Null Keyboard" link其中一个应用程序不需要键盘,但是当光标聚焦在输入(用于扫描目的)字段时,软键盘会出现,但没有任何用途,所以我决定下载这个“空键盘” 链接

When I go out of the app, the entire device is still using the Null keyboard.当我退出应用程序时,整个设备仍在使用空键盘。

Does anyone know how I could switch back to the default keyboard in Java on Android studio?有谁知道我如何在 Android Studio 上切换回 Java 中的默认键盘?

Thanks in advance!提前致谢!

You can return to default keyboard through System settings -> Language and Input -> Keyboards -> Soft keyboards.您可以通过系统设置 -> 语言和输入 -> 键盘 -> 软键盘恢复默认键盘。 Or just using search in system settings.或者只是在系统设置中使用搜索。

If you can get, set, and store something, any given thing, you can "put it back when you're done".如果您可以获取、设置和存储某些东西,任何给定的东西,您都可以“完成后将其放回原处”。

With android and keyboards in particular, I suspect you'd need to get the current keyboard when your app gains focus and save it, then set the null keyboard.特别是对于 android 和键盘,我怀疑当您的应用程序获得焦点并保存时,您需要获取当前键盘,然后设置空键盘。

When the app loses focus, you need to set the original keyboard back again.当应用失去焦点时,您需要重新设置原始键盘。

You'll need to do this every time you gain and lose focus, not just when your app starts and stops.每次获得和失去焦点时都需要这样做,而不仅仅是在应用程序启动和停止时。

(Note that I haven't touched android development in something like 10 years, and I was never terribly experienced then either) (请注意,我已经有 10 年没有接触过 android 开发了,那时我也从未有过非常丰富的经验)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM