@Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        // Only if we have no state
        if (mCurrentPath == null) {
            if (savedInstanceState != null) {
                mode = savedInstanceState.getInt(KEY_MODE, mode);
                allowCreateDir = savedInstanceState
                        .getBoolean(KEY_ALLOW_DIR_CREATE, allowCreateDir);
                allowMultiple = savedInstanceState
                        .getBoolean(KEY_ALLOW_MULTIPLE, allowMultiple);
                allowExistingFile = savedInstanceState
                        .getBoolean(KEY_ALLOW_EXISTING_FILE, allowExistingFile);
                singleClick = savedInstanceState
                        .getBoolean(KEY_SINGLE_CLICK, singleClick);

                String path = savedInstanceState.getString(KEY_CURRENT_PATH);
                if (path != null) {
                    mCurrentPath = getPath(path.trim());
                }
            } else if (getArguments() != null) {
                mode = getArguments().getInt(KEY_MODE, mode);
                allowCreateDir = getArguments()
                        .getBoolean(KEY_ALLOW_DIR_CREATE, allowCreateDir);
                allowMultiple = getArguments()
                        .getBoolean(KEY_ALLOW_MULTIPLE, allowMultiple);
                allowExistingFile = getArguments()
                        .getBoolean(KEY_ALLOW_EXISTING_FILE, allowExistingFile);
                singleClick = getArguments()
                        .getBoolean(KEY_SINGLE_CLICK, singleClick);
                if (getArguments().containsKey(KEY_START_PATH)) {
                    String path = getArguments().getString(KEY_START_PATH);
                    if (path != null) {
                        T file = getPath(path.trim());
                        if (isDir(file)) {
                            mCurrentPath = file;
                        } else {
                            mCurrentPath = getParent(file);
                            mEditTextFileName.setText(getName(file));
                        }
                    }
                }
            }
        }

        setModeView();

        // If still null
        if (mCurrentPath == null) {
            mCurrentPath = getRoot();
        }
        refresh(mCurrentPath);
    }
Called when the fragment's activity has been created and this
fragment's view hierarchy instantiated.  It can be used to do final
initialization once these pieces are in place, such as retrieving
views or restoring state.  It is also useful for fragments that use
{@link #setRetainInstance(boolean)} to retain their instance,
as this callback tells the fragment when it is fully associated with
the new activity instance.  This is called after {@link #onCreateView}
and before {@link #onViewStateRestored(Bundle)}.

@param savedInstanceState If the fragment is being re-created from
                          a previous saved state, this is the state.
android/modules/module_filepicker/src/main/java/com/nononsenseapps/filepicker/AbstractFilePickerFragment.java