【问题标题】:custom list view consisting of web view is not responding to the onitemclicklistener由 web 视图组成的自定义列表视图不响应 onitemclicklistener
【发布时间】:2011-07-12 15:58:30
【问题描述】:

我的应用程序由自定义列表视图组成,其中包含几个 textview 和一个 webview 。应用程序不响应 onitemclicklistener。我无法专注于列表本身。我正在使用网络视图显示来自 URL 的图像。 任何帮助将不胜感激

提前致谢, _/|_

【问题讨论】:

    标签: android listview webview onitemclicklistener


    【解决方案1】:

    您需要将focusableclickable 设置为false,但如果您在xml 中将它们设置为false 则不起作用,如下所示:

     android:clickable="false"
     android:focusable="false"
    

    相反,您需要在代码中使用 a

    myWebViewInAListView.setFocusable(false);
    

    【讨论】:

      【解决方案2】:

      根据this链接,原来如此 该列表项单击事件将永远不会收到列表项 可以处理点击事件或获得焦点的视图。

      【讨论】:

        猜你喜欢
        • 2015-10-15
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-06-23
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多