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

      if (requestCallback && mMultiSelectListener != null) {
        mMultiSelectListener.onMultiSelectStateChanged(false);
      }
    }
  }
Ejemplo 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);
      }
    }
  }
Ejemplo 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);
      }
    }
  }