@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        final View view = inflateRootView(inflater, container);

        Toolbar toolbar = (Toolbar) view.findViewById(R.id.nnf_picker_toolbar);
        if (toolbar != null) {
            setupToolbar(toolbar);
        }

        recyclerView = (RecyclerView) view.findViewById(android.R.id.list);
        // improve performance if you know that changes in content
        // do not change the size of the RecyclerView
        recyclerView.setHasFixedSize(true);
        // use a linear layout manager
        layoutManager = new LinearLayoutManager(getActivity());
        recyclerView.setLayoutManager(layoutManager);
        // Set Item Decoration if exists
        configureItemDecoration(inflater, recyclerView);
        // Set adapter
        mAdapter = new FileItemAdapter<>(this);
        recyclerView.setAdapter(mAdapter);

        view.findViewById(R.id.nnf_button_cancel)
                .setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(final View v) {
                        onClickCancel(v);
                    }
                });

        view.findViewById(R.id.nnf_button_ok).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(final View v) {
                onClickOk(v);
            }
        });
        view.findViewById(R.id.nnf_button_ok_newfile).setOnClickListener(
                new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        onClickOk(v);
                    }
                });

        mNewFileButtonContainer = view.findViewById(R.id.nnf_newfile_button_container);
        mRegularButtonContainer = view.findViewById(R.id.nnf_button_container);

        mEditTextFileName = (EditText) view.findViewById(R.id.nnf_text_filename);
        mEditTextFileName.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {

            }

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {

            }

            @Override
            public void afterTextChanged(Editable s) {
                // deSelect anything selected since the user just modified the name
                clearSelections();
            }
        });

        mCurrentDirView = (TextView) view.findViewById(R.id.nnf_current_dir);
        // Restore state
        if (mCurrentPath != null && mCurrentDirView != null) {
            mCurrentDirView.setText(getFullPath(mCurrentPath));
        }

        return view;
    }
Set before making the fragment visible. This method will re-use the existing
arguments bundle in the fragment if it exists so extra arguments will not
be overwritten. This allows you to set any extra arguments in the fragment
constructor if you wish.
<p/>
The key/value-pairs listed below will be overwritten however.

@param startPath         path to directory the picker will show upon start
@param mode              what is allowed to be selected (dirs, files, both)
@param allowMultiple     selecting a single item or several?
@param allowDirCreate    can new directories be created?
@param allowExistingFile if selecting a "new" file, can existing files be chosen
@param singleClick       selecting an item does not require a press on OK
android/modules/module_filepicker/src/main/java/com/nononsenseapps/filepicker/AbstractFilePickerFragment.java