在 Android Webview 加载 URL 中,其中 EditText 未获得焦点且键盘未启动
In Android Webview loaded URL in which EditText is not getting focus and keyboard is not launching
Below URL is loaded in webview and EditText feild is not gaining focus
as a result keyboard is not displayed.
Loaded URL in WebView :
https://docs.google.com/forms/d/e/1FAIpQLSeICt0NT0xWZZV1iwLEaaZnnw5n5-8iRGt6HGQHQ9QFq1xpyA/viewform?c=0&w=1
Tried Solutions :
Why is Android WebView refusing user input?
任何帮助将不胜感激。
Found the issue :
<WebView
android:id="@+id/common_webview_id"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusableInTouchMode="true"></WebView>
The problem was "focusableInTouchMode" attribute value was set to
"false" i.e android:focusableInTouchMode="false" and it should be
"true" edit text to gain focus.
Below URL is loaded in webview and EditText feild is not gaining focus as a result keyboard is not displayed.
Loaded URL in WebView : https://docs.google.com/forms/d/e/1FAIpQLSeICt0NT0xWZZV1iwLEaaZnnw5n5-8iRGt6HGQHQ9QFq1xpyA/viewform?c=0&w=1
Tried Solutions : Why is Android WebView refusing user input?
任何帮助将不胜感激。
Found the issue :
<WebView
android:id="@+id/common_webview_id"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusableInTouchMode="true"></WebView>
The problem was "focusableInTouchMode" attribute value was set to
"false" i.e android:focusableInTouchMode="false" and it should be "true" edit text to gain focus.