Code example for CursorAdapter

Methods: changeCursor, notifyDataSetChanged

0
    } 
 
    @Override 
    public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
        mCursor = cursor;
        mStreamAdapter.changeCursor(mCursor);
        mStreamAdapter.notifyDataSetChanged();
        if (mListViewStatePosition != -1 && isAdded()) {
            getListView().setSelectionFromTop(mListViewStatePosition, mListViewStateTop);
            mListViewStatePosition = -1;
        } 
    } 
 
    @Override 
    public void onLoaderReset(Loader<Cursor> loader) {
    } 
 
    private class StreamAdapter extends CursorAdapter {
//        private JsonFactory mFactory = new AndroidJsonFactory(); 
        private Map<Long, Tweet> mActivityCache = new HashMap<Long, Tweet>();