开发者

custom list view consisting of web view is not responding to the onitemclicklistener

开发者 https://www.devze.com 2023-03-19 12:52 出处:网络
My开发者_如何转开发 applicationconsists of of custom listviewwhich has couple of textview\'s and a webview . The application does not respond to onitemclicklistener.I am not able to focus on the list

My开发者_如何转开发 application consists of of custom listview which has couple of textview's and a webview . The application does not respond to onitemclicklistener.I am not able to focus on the list itself. I'm using web view to display an image from the URL. any help will be greatly appreciated

thanks in advance, _/|_


You need to set focusable and clickable to false, but it does not work if you set them to false in the xml like so:

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

instead you need to do it in code with a

myWebViewInAListView.setFocusable(false);


According to this link,It turns out that list item click events will never be received for list items with views that can either handle click events or can gain focus.

0

精彩评论

暂无评论...
验证码 换一张
取 消