Code example for Fragment

Methods: getView, onPause

0
 
    } 
 
    @Override 
    public void onPause() { 
        contentView = getView();
        broadcastReceiver.detach();
        super.onPause(); 
    } 
 
    @Override 
    public void onDetach() { 
        super.onDetach(); 
        if (broadcastReceiver != null) {
            broadcastReceiver.detach();
            broadcastReceiver = null;
        } 
    } 
 
    public void onBackPressResult(Bundle resultData) {
        update(false);