public void disableMultiSelectMode(boolean requestCallback) { if (isInMultiSelectMode()) { mSelectedItems.clear(); notifyDataSetChanged(); if (requestCallback && mMultiSelectListener != null) { mMultiSelectListener.onMultiSelectStateChanged(false); } } }
public void setSelected(long threadId) { if (!mSelectedItems.contains(threadId)) { mSelectedItems.add(threadId); notifyDataSetChanged(); if (mSelectedItems.size() == 1 && mMultiSelectListener != null) { mMultiSelectListener.onMultiSelectStateChanged(true); } } }
public void setUnselected(long threadId) { if (mSelectedItems.contains(threadId)) { mSelectedItems.remove(threadId); notifyDataSetChanged(); if (mSelectedItems.size() == 0 && mMultiSelectListener != null) { mMultiSelectListener.onMultiSelectStateChanged(false); } } }