I'm building a File manager on android platform.I want my users to be able to select multiple files on long click on a file.How to do it?(In list view) Thanks in advance.
Asked
Active
Viewed 2,835 times
1
-
when user long clicks on a file.The list view mode should change to multiple so that user is able to select multiple files. – Raghava Dhanya Apr 06 '15 at 15:57
-
`lv.setOnItemLongClickListener(new OnItemLongClickListener() { public boolean onItemLongClick(AdapterView> arg0, View arg1, int pos, long id) { // I want to add something over here to change previous mode of list view to MULTIPLE selection mode return true; } }); ` – Raghava Dhanya Apr 06 '15 at 16:03
1 Answers
1
Assuming you're using a ListView
, I believe you're looking for android:choiceMode="multipleChoiceModal"
or setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL)

ekchang
- 939
- 5
- 11