Showing posts with label cursor. Show all posts
Showing posts with label cursor. Show all posts

Tuesday, May 15, 2012

Usage CursorLoader without ContentProvider


Android SDK documentation says that startManagingCursor() method is depracated:




This method is deprecated. Use the new CursorLoader class with LoaderManager instead; this is also available on older platforms through the Android compatibility package. This method allows the activity to take care of managing the given Cursor's lifecycle for you based on the activity's lifecycle. That is, when the activity is stopped it will automatically call deactivate() on the given Cursor, and when it is later restarted it will call requery() for you. When the activity is destroyed, all managed Cursors will be closed automatically. If you are targeting HONEYCOMB or later, consider instead using LoaderManager instead, available via getLoaderManager()


Monday, May 7, 2012

How to hide cursor


Is there anyway to hide cursor other than using transparent gif image?

Tuesday, April 3, 2012

Best way to join tables using sqlite in android


I am trying to find out the best way to do a simple table join on my two tables using a sqlite database in an android application. Is the simplest way to use CursorJoiner or is there any easier way?

Sunday, January 15, 2012

How to update listview whose data was queried from database through SimpleCursorAdapter?


I want to show the items queried from database in the listview with SimpleCursorAdapter. For example, there may be 20,000 items in the database. I want to just load 100 items(_id : 1-100) queried instead of load all items, when scrolling in the end of listview, load another 100 items(_id : 101-200) queried, how to achieve it? Any suggestion is welcome, thanks.