vin
vin

Reputation: 337

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, _/|_

Upvotes: 0

Views: 1126

Answers (2)

vin
vin

Reputation: 337

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.

Upvotes: 1

marc
marc

Reputation: 21

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);

Upvotes: 2

Related Questions