diff --git a/library/src/main/java/com/nononsenseapps/filepicker/AbstractFilePickerFragment.java b/library/src/main/java/com/nononsenseapps/filepicker/AbstractFilePickerFragment.java index e2309bc2..b2b3d213 100644 --- a/library/src/main/java/com/nononsenseapps/filepicker/AbstractFilePickerFragment.java +++ b/library/src/main/java/com/nononsenseapps/filepicker/AbstractFilePickerFragment.java @@ -64,7 +64,7 @@ public abstract class AbstractFilePickerFragment extends Fragment public static final String KEY_START_PATH = "KEY_START_PATH"; // See MODE_XXX constants above for possible values public static final String KEY_MODE = "KEY_MODE"; - // If it should be possible to create directories. Only valid with MODE_DIR + // If it should be possible to create directories. public static final String KEY_ALLOW_DIR_CREATE = "KEY_ALLOW_DIR_CREATE"; // Allow multiple items to be selected. public static final String KEY_ALLOW_MULTIPLE = "KEY_ALLOW_MULTIPLE"; @@ -296,7 +296,7 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.picker_actions, menu); MenuItem item = menu.findItem(R.id.action_createdir); - item.setVisible(allowCreateDir && (mode == MODE_DIR)); + item.setVisible(allowCreateDir); } @Override diff --git a/sample/src/main/res/layout/activity_no_nonsense_file_picker.xml b/sample/src/main/res/layout/activity_no_nonsense_file_picker.xml index 60bb264b..8fbb51f7 100644 --- a/sample/src/main/res/layout/activity_no_nonsense_file_picker.xml +++ b/sample/src/main/res/layout/activity_no_nonsense_file_picker.xml @@ -92,7 +92,7 @@