ListView clicklisteners
I have a list view
which has a couple of views within it, I have a textView
and an ImageView
.
What I need to do is, I want a person to be able to click just on the imageView
without causing the onItemClicked
function to be invoked, If the person clicks the ImageView
, it should do something else, but if the person clicks away(apart from the imageview
) from the imageView
, then the onItemClicked
is fired.
How do I do this?
It is kinda like, the listView
on the android phone callLogs
whereby, the green phone icon开发者_如何学Python is somehow separated from the list but when clicked, it should know which listItem
was selected and act accordingly.
I will appreciate the help. Thanks.
Here are some links for you are looking for. Advanced but if you stick with it and dont give up on this, you will learn a ton!!! Take a look:
Android: ListView elements with multiple clickable buttons
Android custom list item with nested widgets
use holder.imageView.setOnClickListener()
in getView() method of adapter class.
精彩评论