I have a listview in my android application . This List View is filled with Messages. Now i want to give the user a ability to select multiple messages and then delete them or move them. Clicking on the List Item displays the message details. Now i want some suggestions . 1) How can i give the user the ability to select multiple messages? check box or some other method? I use the messagesListView.setOnItemClickListener(this); to get the message that was clicked on ? My Custom Adapter, i have overridden the setOnLongClickListener to get the long click on a List Item . But somehow this acts really strange . Like when i want to long click the short click listener is fired ? Am i making sense ? My question is how can i give the user an efficient way to select multiple items in a ListView ?
Asked
Active
Viewed 522 times
0
-
please check this answer http://stackoverflow.com/questions/3825645/android-listview-with-multiple-select-and-custom-adapter – rajpara Jun 18 '12 at 13:51
3 Answers
0
CheckBox
is the best way to achieve multiple selection for listview. Also you don't have to implement onItemClick()
for this purpose. Even almost every android application give the same functionality with CheckBox
.

user370305
- 108,599
- 23
- 164
- 151
-
Please this is unexpected from you that you haven't given this link: http://stackoverflow.com/questions/3825645/android-listview-with-multiple-select-and-custom-adapter – Paresh Mayani Jun 18 '12 at 13:55