How can i get items inside my listview to detect on single clickevent my listview OnitemClickListener is working when the item is clicked but my listview contains an image and a button each with different actions but i have to click twice before the action of the image is fire and also click twice befor the action of the button is fired. Is there a way to detect if the image is click on the first click and then fire the action. Here is my listview onItemClick code
listView.setOnItemClickListener((parent, view, position, id) -> {
ImageView imgOpen = view.findViewById(R.id.pImage);
imgOpen.setOnClickListener(v -> {
//Action For Image Here
});
Button btnOpen = view.findViewById(R.id.btnOpen);
btnOpen.setOnClickListener(v -> {
//Action For Button Here
});
});