I am doing a listView on android to display the list of all collection points, each with area and address, then user can click to each item and delete/edit it. ListView is populated by an array adapter with class Collection point.
When I try to set the action for user to click on a specific item on listview, I found there are some options: setOnItemSelectedListener vs setOnItemClickListener and setOnClickListener what is the differences between those, and which situation we should use each ? P/s: can you also explain the difference between onClick and onLongClick Thank you !
                        
onClickis used to invoke a specific operation when we simply click on the listview item where asonLongClickis used when we click on the list item for long time(hold the item more than 1 sec and release.setOnItemClickListeneris used when the item is clicked (single selection) vssetOnItemSelectedListenerfor the item is selected (used in multiple selection)setOnClickListeneris used to clicking event for button, txtview, imgview..