leonHua / LFilePicker

Android 检索手机目录方式的文件选择器,轻量且界面友好,定制性高。This is a lightweight file selector, it can select files by retrieve phone directory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

能限制withStartPath的文件夹没有上一级的按钮吗

yeli19950109 opened this issue · comments

commented

withStartPath 好像只能设置初始的文件夹 但是这个文件夹还是回到上一级
/storage/emulated/0/ 这个退到 /storage/emulated是 界面显示为空 就没法进入下一级了 就只能退出重选

commented

还有我现在打算把 LFilePicker 封装成Cordova插件 发现直接调用 new LFilePicker () 在cordovaPLugin里面不太好用 所以我改了

public Intent start() {
if (mActivity == null && mFragment == null && mSupportFragment == null) {
throw new RuntimeException("You must pass Activity or Fragment by withActivity or withFragment or withSupportFragment method");
}
Intent intent = initIntent();
Bundle bundle = getBundle();
intent.putExtras(bundle);
return intent;
}

在插件里
Intent intent = new MFilePicker()
.withActivity(cordova.getActivity())
.withRequestCode(REQUESTCODE_FROM_ACTIVITY)
.withChooseMode(true)
.withStartPath("/storage/emulated/0/Download")
.start();

cordova.startActivityForResult((CordovaPlugin) this, intent, REQUESTCODE_FROM_ACTIVITY);