Code example for Fragment

Methods: getActivity, onDestroyView

0
        onFeedUpdated(); 
    } 
 
    @Override 
    public void onDestroyView() { 
        super.onDestroyView(); 
        getActivity().getContentResolver().unregisterContentObserver(mFeedObserver);
    } 
 
    public abstract void onFeedUpdated();  
}