Java Code Examples for com.nononsenseapps.filepicker.AbstractFilePickerFragment#setArgs()

The following examples show how to use com.nononsenseapps.filepicker.AbstractFilePickerFragment#setArgs() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FastScrollerFilePickerActivity.java    From video-transcoder with GNU General Public License v3.0 5 votes vote down vote up
protected AbstractFilePickerFragment<File> getFragment(
        @Nullable final String startPath, final int mode, final boolean allowMultiple,
        final boolean allowCreateDir) {
    AbstractFilePickerFragment<File> fragment = new FastScrollerFilePickerFragment();
    // startPath is allowed to be null. In that case, default folder should be SD-card and not "/"
    fragment.setArgs(startPath != null ? startPath : Environment.getExternalStorageDirectory().getPath(),
            mode, allowMultiple, allowCreateDir, true, false);
    return fragment;
}
 
Example 2
Source File: CustomFilePickerActivity.java    From citra_android with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected AbstractFilePickerFragment<File> getFragment(
        @Nullable final String startPath, final int mode, final boolean allowMultiple,
        final boolean allowCreateDir, final boolean allowExistingFile,
        final boolean singleClick)
{
  AbstractFilePickerFragment<File> fragment = new CustomFilePickerFragment();
  // startPath is allowed to be null. In that case, default folder should be SD-card and not "/"
  fragment.setArgs(
          startPath != null ? startPath : Environment.getExternalStorageDirectory().getPath(),
          mode, allowMultiple, allowCreateDir, allowExistingFile, singleClick);
  return fragment;
}
 
Example 3
Source File: MIVFilePickerActivity.java    From a-sync-browser with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected AbstractFilePickerFragment<File> getFragment(
        final String startPath, final int mode, final boolean allowMultiple,
        final boolean allowCreateDir) {
    // Only the fragment in this line needs to be changed
    AbstractFilePickerFragment<File> fragment = new MIVFilePickerFragment();
    fragment.setArgs(startPath, mode, allowMultiple, allowCreateDir);
    return fragment;
}
 
Example 4
Source File: MultimediaPickerActivity.java    From NoNonsense-FilePicker with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected AbstractFilePickerFragment<File> getFragment(
        @Nullable final String startPath, final int mode, final boolean allowMultiple,
        final boolean allowCreateDir, final boolean allowExistingFile,
        final boolean singleClick) {
    AbstractFilePickerFragment<File> fragment = new MultimediaPickerFragment();
    // startPath is allowed to be null. In that case, default folder should be SD-card and not "/"
    fragment.setArgs(startPath != null ? startPath : Environment.getExternalStorageDirectory().getPath(),
            mode, allowMultiple, allowCreateDir, allowExistingFile, singleClick);
    return fragment;
}
 
Example 5
Source File: FastScrollerFilePickerActivity.java    From NoNonsense-FilePicker with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected AbstractFilePickerFragment<File> getFragment(
        @Nullable final String startPath, final int mode, final boolean allowMultiple,
        final boolean allowCreateDir, final boolean allowExistingFile,
        final boolean singleClick) {
    AbstractFilePickerFragment<File> fragment = new FastScrollerFilePickerFragment();
    // startPath is allowed to be null. In that case, default folder should be SD-card and not "/"
    fragment.setArgs(startPath != null ? startPath : Environment.getExternalStorageDirectory().getPath(),
            mode, allowMultiple, allowCreateDir, allowExistingFile, singleClick);
    return fragment;
}
 
Example 6
Source File: SUPickerActivity.java    From NoNonsense-FilePicker with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected AbstractFilePickerFragment<File> getFragment(@Nullable String startPath,
                                                       int mode,
                                                       boolean allowMultiple,
                                                       boolean allowCreateDir,
                                                       boolean allowExistingFile,
                                                       boolean singleClick) {
    AbstractFilePickerFragment<File> fragment = new SUPickerFragment();
    // startPath is allowed to be null. In that case, default folder should be SD-card and
    // not "/"
    fragment.setArgs(
            startPath != null ? startPath : Environment.getExternalStorageDirectory().getPath(),
            mode, allowMultiple, allowCreateDir, allowExistingFile, singleClick);
    return fragment;
}