Code example for CursorLoader

Methods: getContext, onStartLoading

0
        onAbandon(); 
    } 
 
    protected final void onStartLoading() 
    { 
        super.onStartLoading(); 
        if(!mObserverRegistered)
        { 
            ContentResolver contentresolver = getContext().getContentResolver();
            contentresolver.registerContentObserver(mActivityUri, false, mObserver);
            contentresolver.registerContentObserver(mCommentsUri, false, mObserver);
            mObserverRegistered = true;
        } 
    } 
 
    protected final void onStopLoading() 
    { 
    } 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE