Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法防止软键盘出现在 WebView 中?我的应用程序连接到模拟键盘输入的扫描仪(到目前为止有效),所以软键盘只有在占据屏幕时才会令人讨厌。Playstore 中的 Nullkeyboard 可以解决问题,但在某些情况下,我想再次启用键盘。
如果有帮助,我可以控制正在显示的网页内容。想避免编写完整的输入法。
在您的清单中,android:windowSoftInputMode="stateAlwaysHidden"不应显示活动、使用和软键盘。
android:windowSoftInputMode="stateAlwaysHidden"