gpt4 book ai didi

按下 "Go"按钮时的 Android webview 键盘 Action

转载 作者:行者123 更新时间:2023-12-05 00:08:41 25 4
gpt4 key购买 nike

我在 WebView 上显示我的网页。我的网页有输入标签。当输入处于 Activity 状态时,将显示软键盘。当我按下“开始”按钮时,我发现 Android 4.4 和 4.2 的操作不同。

  • 在 Android 4.4 中,当我按下“Go”时没有任何 Action 。

  • 在 Android 4.2 中,当我按下“Go”时,键盘会隐藏。

这些不同的操作不利于用户体验。我想控制这个。是否有任何文件描述了我可以引用的差异?谢谢。

最佳答案

你对 EditText 有什么选择。

在我的 4.4 和 4.2 设备中,当我按下“GO”时,键盘会隐藏。

下面是我对 edittext 的设置:

<EditText
android:id="@+id/edit_input"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:imeOptions="actionGo" />

关于按下 "Go"按钮时的 Android webview 键盘 Action ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24031771/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com