Exemplo n.º 1
0
  public void disableMultiSelectMode(boolean requestCallback) {
    if (isInMultiSelectMode()) {
      mSelectedItems.clear();
      notifyDataSetChanged();

      if (requestCallback && mMultiSelectListener != null) {
        mMultiSelectListener.onMultiSelectStateChanged(false);
      }
    }
  }
Exemplo n.º 2
0
  public void setSelected(long threadId) {
    if (!mSelectedItems.contains(threadId)) {
      mSelectedItems.add(threadId);
      notifyDataSetChanged();

      if (mSelectedItems.size() == 1 && mMultiSelectListener != null) {
        mMultiSelectListener.onMultiSelectStateChanged(true);
      }
    }
  }
Exemplo n.º 3
0
  public void setUnselected(long threadId) {
    if (mSelectedItems.contains(threadId)) {
      mSelectedItems.remove(threadId);
      notifyDataSetChanged();

      if (mSelectedItems.size() == 0 && mMultiSelectListener != null) {
        mMultiSelectListener.onMultiSelectStateChanged(false);
      }
    }
  }