一个特别的原因,我加入一个虚拟的内容对我的光标。 但后用户必须进行一些行动,我希望删除这一虚拟内容,我加入到标。 是有选择这样做吗?
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());
}