Visit GitHub RepoDatabase


This library is design to insert cursor row inside another cursor or insert dummy row inside actual cursor.


  • Insert cursor row at particular position inside actual cursor.
  • Insert a cursor row after particular interval inside actual cursor.


  • Library : API 1
  • LibrarySample : API 1

How to use library

1:To create cursor row : example:

HashMap<String, Object> cursorData = new HashMap<String, Object>();
cursorData.put("_id", -1);
cursorData.put("title", "Android");
Cursor cursorRow = CursorCreator.getCursorRow(cursorData);

2:To insert cursor at particular position: example:

HashMap<Integer, Cursor> cursorBucket = new HashMap<Integer, Cursor>()
Cursor cursorRow1=...;
Cursor cursorRow2=...;
Cursor cursorRow2=...;
cursorBucket.put(2, cursorRow1);
cursorBucket.put(4, cursorRow2);
cursorBucket.put(5, cursorRow3);

where 2,4,5 reprsent position where cursorRow1,cursorRow2,cursorRow3 respectivily get added inside actual cursor;

1:To insert cursor at particular interval : example:

Cursor cursorRow=...;
Cursor mergedCursor = CursorCreator.mergeCursorAtInterval(cursorRow1,
				actualCursor, 3);
where 3 reprsents interval


No need to add any extra config.


Copyright 2014-present Ajay Sahani

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Become a better Android Developer
Millions of developers are learning at MindOrks

Online Training Program

Featured Blogs

Our Team

MindOrks is Certainly one of the best online blog to stay on top of all the Android development news, coding and design patterns. Finally a blog I can count on to keep myself updated with latest and greatest things happening in Android world.

Vipul Shah
Android Developer

Become Pro in Android by watching videos