当我单击(input type="text")WebView中的输入文本字段时,该字段显示软键盘但光标未显示.我可以键入文本,但没有光标......当发生这种情况时,Logcat说"W/IInputConnectionWrapper? showStatusIcon on inactive InputConnection" or "W/IInputConnectionWrapper? getTextBeforeCursor on inactive InputConnection".
我尝试了override我的WebView制作onCheckIsTextEditor() return true;,但没有任何作用.请帮忙.
我通过将焦点设置为WebView的封闭视图来解决此问题.
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true">
<WebView
android:id="@+id/web_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<include
android:id="@+id/progress_bar"
layout="@layout/progress_bar"/>
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2082 次 |
| 最近记录: |