@Override
    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
        inflater.inflate(R.menu.picker_actions, menu);

        MenuItem item = menu.findItem(R.id.nnf_action_createdir);
        item.setVisible(allowCreateDir);
    }
Hides/Shows appropriate views depending on mode
android/modules/module_filepicker/src/main/java/com/nononsenseapps/filepicker/AbstractFilePickerFragment.java