Code example for ListFragment

Methods: getActivity, onDetach

0
 
    } 
 
    @Override 
    public void onDetach() { 
        super.onDetach(); 
        getActivity().getContentResolver().unregisterContentObserver(mObserver);
 
    } 
 
    @Override 
    public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
        mCommentAdapter.swapCursor(cursor);
    } 
 
    @Override 
    public void onLoaderReset(Loader<Cursor> cursorLoader) {
        mCommentAdapter.swapCursor(null);
    } 
 
Connect your IDE to all the code out there  Get Codota for Java