Lines Matching refs:cursor

38         Cursor cursor;
84 * Registers a partition. The cursor for that partition can be set later.
105 Cursor cursor = mPartitions.get(partitionIndex).cursor;
106 if (cursor != null && !cursor.isClosed()) {
107 cursor.close();
122 partition.cursor = null;
133 Cursor cursor = partition.cursor;
134 if (cursor != null && !cursor.isClosed()) {
135 cursor.close();
172 Cursor cursor = partition.cursor;
174 if (cursor == null || cursor.isClosed()) {
177 count = cursor.getCount();
207 * Returns the cursor for the given partition
210 return mPartitions.get(partition).cursor;
214 * Changes the cursor for an individual partition.
216 public void changeCursor(int partition, Cursor cursor) {
217 Cursor prevCursor = mPartitions.get(partition).cursor;
218 if (prevCursor != cursor) {
222 mPartitions.get(partition).cursor = cursor;
223 if (cursor != null && !cursor.isClosed()) {
224 mPartitions.get(partition).idColumnIndex = cursor.getColumnIndex("_id");
232 * Returns true if the specified partition has no cursor or an empty cursor.
235 Cursor cursor = mPartitions.get(partition).cursor;
236 return cursor == null || cursor.isClosed() || cursor.getCount() == 0;
345 view = getHeaderView(i, mPartitions.get(i).cursor, convertView, parent);
347 if (!mPartitions.get(i).cursor.moveToPosition(offset)) {
348 throw new IllegalStateException("Couldn't move cursor to position "
351 view = getView(i, mPartitions.get(i).cursor, offset, convertView, parent);
368 protected View getHeaderView(int partition, Cursor cursor, View convertView,
372 : newHeaderView(mContext, partition, cursor, parent);
373 bindHeaderView(view, partition, cursor);
380 protected View newHeaderView(Context context, int partition, Cursor cursor,
388 protected void bindHeaderView(View view, int partition, Cursor cursor) {
394 protected View getView(int partition, Cursor cursor, int position, View convertView,
400 view = newView(mContext, partition, cursor, position, parent);
402 bindView(view, partition, cursor, position);
408 * corresponds directly to the current cursor position.
410 protected abstract View newView(Context context, int partition, Cursor cursor, int position,
415 * corresponds directly to the current cursor position.
417 protected abstract void bindView(View v, int partition, Cursor cursor, int position);
420 * Returns a pre-positioned cursor for the specified list position.
435 Cursor cursor = mPartition.cursor;
436 if (cursor == null || cursor.isClosed() || !cursor.moveToPosition(offset)) {
439 return cursor;
467 Cursor cursor = mPartition.cursor;
468 if (cursor == null || cursor.isClosed() || !cursor.moveToPosition(offset)) {
471 return cursor.getLong(mPartition.idColumnIndex);