Code example for Fragment

Methods: onDetach

0
        super.onAttach(activity);
    } 
 
    @Override 
    public void onDetach() { 
        super.onDetach(); 
        contract = null;
    } 
 
    public final T getContract() { 
        return contract;
    } 
 
}