custom list view consisting of web view is not responding to the onitemclicklistener
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.
精彩评论