@Override public void onCheckedChanged(RadioGroup group, int checkedId) { if (changeListener != null) changeListener.onChange(mSparseIds.indexOfValue(checkedId)); }
/** * Get the list position mapped to by the provided Cursor position. * If the provided Cursor position has been removed by a drag-sort, * this returns {@link #REMOVED}. * * @param cursorPosition A Cursor position * @return The mapped-to list position or REMOVED */ public int getListPosition(int cursorPosition) { if (mRemovedCursorPositions.contains(cursorPosition)) { return REMOVED; } int index = mListMapping.indexOfValue(cursorPosition); if (index < 0) { return cursorPosition; } else { return mListMapping.keyAt(index); } }
/** * Get the list position mapped to by the provided Cursor position. If the * provided Cursor position has been removed by a drag-sort, this returns * {@link #REMOVED}. * * @param cursorPosition A Cursor position * @return The mapped-to list position or REMOVED */ public int getListPosition(int cursorPosition) { if (mRemovedCursorPositions.contains(cursorPosition)) { return REMOVED; } int index = mListMapping.indexOfValue(cursorPosition); if (index < 0) { return cursorPosition; } else { return mListMapping.keyAt(index); } }
/** * Get the list position mapped to by the provided Cursor position. * If the provided Cursor position has been removed by a drag-sort, * this returns {@link #REMOVED}. * * @param cursorPosition A Cursor position * @return The mapped-to list position or REMOVED */ public int getListPosition(int cursorPosition) { if (mRemovedCursorPositions.contains(cursorPosition)) { return REMOVED; } int index = mListMapping.indexOfValue(cursorPosition); if (index < 0) { return cursorPosition; } else { return mListMapping.keyAt(index); } }
/** * Get the list position mapped to by the provided Cursor position. * If the provided Cursor position has been removed by a drag-sort, * this returns {@link #REMOVED}. * * @param cursorPosition A Cursor position * @return The mapped-to list position or REMOVED */ public int getListPosition(int cursorPosition) { if (mRemovedCursorPositions.contains(cursorPosition)) { return REMOVED; } int index = mListMapping.indexOfValue(cursorPosition); if (index < 0) { return cursorPosition; } else { return mListMapping.keyAt(index); } }
/** * Get the list position mapped to by the provided Cursor position. * If the provided Cursor position has been removed by a drag-sort, * this returns {@link #REMOVED}. * * @param cursorPosition A Cursor position * @return The mapped-to list position or REMOVED */ public int getListPosition(int cursorPosition) { if (mRemovedCursorPositions.contains(cursorPosition)) { return REMOVED; } int index = mListMapping.indexOfValue(cursorPosition); if (index < 0) { return cursorPosition; } else { return mListMapping.keyAt(index); } }
/** * Get the list position mapped to by the provided Cursor position. * If the provided Cursor position has been removed by a drag-sort, * this returns {@link #REMOVED}. * * @param cursorPosition A Cursor position * @return The mapped-to list position or REMOVED */ public int getListPosition(int cursorPosition) { if (mRemovedCursorPositions.contains(cursorPosition)) { return REMOVED; } int index = mListMapping.indexOfValue(cursorPosition); if (index < 0) { return cursorPosition; } else { return mListMapping.keyAt(index); } }
/** * Get the list position mapped to by the provided Cursor position. If the * provided Cursor position has been removed by a drag-sort, this returns * {@link #REMOVED}. * * @param cursorPosition * A Cursor position * @return The mapped-to list position or REMOVED */ public int getListPosition(int cursorPosition) { if (mRemovedCursorPositions.contains(cursorPosition)) { return REMOVED; } int index = mListMapping.indexOfValue(cursorPosition); if (index < 0) { return cursorPosition; } else { return mListMapping.keyAt(index); } }