Code example for Fragment

Methods: onDetach

0
         
        // Removes the reference to the URL 
        mURLString = null;
         
        // Always call the super method last 
        super.onDetach(); 
    } 
 
    /* 
     * This callback is invoked if the system asks the Fragment to save its state. This allows the 
     * the system to restart the Fragment later on. 
     */ 
    @Override 
    public void onSaveInstanceState(Bundle bundle) {
        // Always call the super method first 
        super.onSaveInstanceState(bundle);
         
        // Puts the current URL for the picture being shown into the saved state 
        bundle.putString(PHOTO_URL_KEY, mURLString);
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE