Skip to content Skip to sidebar Skip to footer

How To Handle Click On Imageview In Custom Listview With Image And Textview?

I Want to know how do we handle click on Imageview on a Custom Listview with Image and Textview. I Even made Imageview Clickable. Here is my code for CustomAdapter.java public cla

Solution 1:

It's convenient not to make any element of the custom view clickable and implement the listView.setOnItemClickListener(new ListClickHandler());

In fact, on long and scrollable lists, it happened that I clicked on one image item and the description was not correct. It belonged to the one of another image. I solved this problem removing all the possibilities to have a clickable image or button within a custom listview, and implement the on click listener on it.

See this example:

https://github.com/alessandroargentieri/AuctionExample/blob/master/app/src/main/java/argentieri/alessandro/crossoverauction/ViewActivity.java

Post a Comment for "How To Handle Click On Imageview In Custom Listview With Image And Textview?"