특별한 이유가 나를 추가하는 더미 콘텐츠를 내가 커집니다. 그러나 사용자가 수행하고 몇 가지 조치를 제거하려는 더미 콘텐츠가 추가 됩니다. 는 옵션이 있습니다.
https://stackoverflow.com/a/18154738/14705856이 솔루션 중 하나는 내가 발견에서 그래서. 하지만 문제는 테이블을 사용하고 있는 많은 열이 있습니다. 그래서 어떤 방법을 사본에 모든 행 값을 추가하는 대신 그들을 cursor.getString(columnPosition)
.
String exclueRef = "Some id to exclude for the new";
MatrixCursor newCursor = new MatrixCursor(new String[] {"column A", "column B");
if (cursor.moveToFirst()) {
do {
// skip the copy of this one ....
if (cursor.getString(0).equals(exclueRef))
continue;
newCursor.addRow(new Object[]{cursor.getString(0), cursor.getString(1)});
} while (cursor.moveToNext());
}