Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Make createdir depend only on CREATE_DIR argument
Browse files Browse the repository at this point in the history
Fixes #25

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>
  • Loading branch information
spacecowboy committed May 30, 2015
1 parent 6225972 commit 38f4ee2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public abstract class AbstractFilePickerFragment<T> 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";
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<CheckBox
android:layout_width="match_parent"
android:layout_height="48dp"
android:text="Allow creation of directories\n(if selecting directories)"
android:text="Allow creation of directories"
android:id="@+id/checkAllowCreateDir"
android:gravity="center_vertical"
style="?android:textAppearanceMedium"
Expand Down

0 comments on commit 38f4ee2

Please sign in to comment.