Android WebView inside ListView onclick event issues

前端 未结 6 1202
太阳男子
太阳男子 2020-12-25 09:03

I have a ListView where each row has two webviews side by side, taking up the entire row. I\'ve set up onListItemClick() in my ListActivity, but they are not fired when I ta

6条回答
  •  死守一世寂寞
    2020-12-25 09:33

    I was using the following layout in ListView and it was working perfectly, ie its clicking, scrolling and so on.

    TextView1 
    ImageView1 TextView2 ImageView2
    TextView3
    

    Then I have changed the layout with following, ie I have added with WebView control in left most corner in place of ImageView1

    TextView1 
    WebView TextView2 ImageView2
    TextView3
    

    After doing this, clicking was not working for me.

    I solve this problem by adding this to the Webview:

    webView.setFocusable(false);
    webView.setClickable(false);
    

提交回复
热议问题