Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了单击webview中的输入时未显示Android键盘大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我在我的 Android应用程序中实现了自定义webview.如果我触摸此webview中的输入或文本区域,则软键盘不会显示.我没有在我的webview中覆盖任何touchlisteners,也没有在我的清单中更改任何内容.任何人都可以帮我弄清楚为什么键盘没有显示

我的布局代码

<RelativeLayout xmlns:android="http://scheR_543_11845@as.android.com/apk/res/android"
    xmlns:tools="http://scheR_543_11845@as.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <android.support.v4.widget.SwiperefreshLayout
        android:id="@+id/swiperefreshLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <nl.AEGEE.enschede.android.AEGEEWebView
            android:id="@+id/webView"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </android.support.v4.widget.SwiperefreshLayout>

    <ProgressBar
        android:id="@+id/progressBar"
        style="?android:attr/progressBarStyleHorizontal"
        android:progressTint="@color/aegee_blue"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="-6dp"
        android:layout_alignParentTop="true" />

</RelativeLayout>

解决方法

请尝试将这些行添加到XML文件中的webview中.
android:focusable="true"
android:focusableInTouchMode="true"

希望能帮助到你.

大佬总结

以上是大佬教程为你收集整理的单击webview中的输入时未显示Android键盘全部内容,希望文章能够帮你解决单击webview中的输入时未显示Android键盘所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。