Long tap gesture not working in ListFragment in combination with AdapterView.OnItemLongClickListener. I'm trying to achieve the GMail like long-tap selection and continuous selection on upcoming single taps.
The ListFragment declared as below:
public class VacationListFragment extends ListFragment implements View.OnClickListener,
ActionMode.Callback, AdapterView.OnItemClickListener,
AdapterView.OnItemLongClickListener, AbsListView.MultiChoiceModeListener, {
ListFragment loads the data from DB with SimpleCursorAdapter as below:
mAdapter = new SimpleCursorAdapter(getActivity(), R.layout.vacationlist_row_item, null,
fromColumns, toView, 0);
mVacationListView.setAdapter(mAdapter);
Current scenario:
on single the CAB shows up with provided menu(delete) and the action is working. Screenshot pasted below:
I believe we're very close to solution and any input would be appreciated. Feel free to ping if I'm not pedagogical. Thanks.
I could solve the issue with below code sample. It's Good example for Multi-select list for ListFragment in conjunction with LoaderCallbacks and MultiChoiceModeListener.