Code example for DialogFragment

Methods: onDestroy

0
 
    @Override 
    public void onDestroy() 
    { 
        WorkaroundSavedState.savedInstanceState = null;
        super.onDestroy(); 
    } 
 
    /** 
     * Static class that stores the state of the task across orientation 
     * changes. There is a bug in the compatibility library, at least as of the 
     * 4th revision, that causes the save state to be null in the dialog's 
     * onRestoreInstanceState. 
     */ 
    public static final class WorkaroundSavedState { 
        public static Bundle savedInstanceState;
    } 
}