I make elegantly professional ** 📱 Android apps and 🌐 Website** for a living and also Write some blogs. 🌈
zlyang110 / fileselector Goto Github PK
View Code? Open in Web Editor NEWAndroid 文件选择器,指定选择文件夹还是文件,根据后缀名过滤,支持多选
Android 文件选择器,指定选择文件夹还是文件,根据后缀名过滤,支持多选
我这边使用了之后,不能正常显示目录,显示的目录为空。
使用你的demo apk是可以正常显示的。
这是我的 APK 路径:https://github.com/wt-relax/Learn/blob/master/test.7z
项目设置了混淆,怎么填写混淆规则
你好,请问下Android 11 读取不到文件(pdf文件),如何解决呢?
HONOR手机,Android系统为10
项目里Glide版本使用4.12.0
其它第三方的库使用版本4.9.0
本库用的是4.8.0,只要选择有图片的目录就会出错
No virtual method centerCrop()Lcom/bumptech/glide/request/RequestOptions; in class Lcom/bumptech/glide/request/RequestOptions; or its super classes (declaration of 'com.bumptech.glide.request.RequestOptions'
另外provider的问题也与其它库冲突
你好,我想请教一下这里的缩略图是通过什么方式获取的呢?我一直找不到源码....请赐教
没有使用自定义FileProvider,导致与其他三方依赖的FileProvider冲突。
如题
Caused by: java.lang.ClassCastException: com.zlylib.fileselectorlib.bean.EssFile cannot be cast to java.lang.String
单选时, 在FileSelectorActivity的 onItemClick中
if (SelectOptions.getInstance().isSingle) {
mSelectedFileList.add(item);
mSelectedList.add(item.getAbsolutePath());
Intent result = new Intent();
result.putParcelableArrayListExtra(Const.EXTRA_RESULT_SELECTION, mSelectedFileList);
setResult(RESULT_OK, result);
super.onBackPressed();
return;
}
ArrayList<EssFile> mSelectedFileList = new ArrayList<>();// 全部信息列表
类型与为ArrayList<EssFile>
与MainAct需要的类型不同
在MainActi中
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
if (requestCode == 1) {
if (data.getStringArrayListExtra(Const.EXTRA_RESULT_SELECTION) != null) {
ArrayList<String> essFileList = data.getStringArrayListExtra(Const.EXTRA_RESULT_SELECTION);
StringBuilder builder = new StringBuilder();
for (String file : essFileList) {
builder.append(file).append("\n");
}
tv_backResult.setText(builder.toString());
}
}
}
}
ArrayList essFileList 这里需要的类型和FileSelectorActivity返回类型不同
将FileSelectorActivity中的单选返回改为result.putStringArrayListExtra(Const.EXTRA_RESULT_SELECTION, mSelectedList);
if (SelectOptions.getInstance().isSingle) {
mSelectedFileList.add(item);
mSelectedList.add(item.getAbsolutePath());
Intent result = new Intent();
result.putStringArrayListExtra(Const.EXTRA_RESULT_SELECTION, mSelectedList);
setResult(RESULT_OK, result);
super.onBackPressed();
return;
}
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.1.0] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:40:5-108:19 to override.
请问这个怎么解决呀
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
at com.zlylib.fileselectorlib.ui.FileSelectorActivity.onBackPressed(FileSelectorActivity.java:342)
at com.zlylib.fileselectorlib.ui.FileSelectorActivity$1.onClick(FileSelectorActivity.java:109)
at com.zlylib.titlebarlib.ActionBarCommon$3.onClick(ActionBarCommon.java:225)
at android.view.View.performClick(View.java:7496)
at android.view.View.performClickInternal(View.java:7473)
at android.view.View.access$3600(View.java:831)
at android.view.View$PerformClick.run(View.java:28642)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:7876)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Android 5.1
插入u盘
打开app后下拉箭头能看到”内部存储设备“,”sd卡19“,sd卡19打开后都是空的,都不是u盘文件
ps:系统自带的es文件浏览器能打开U盘文件
文件夹正常显示,文件不显示
gradle 已配置maven { url 'https://www.jitpack.io' },但还是报错 Could not GET 'https://jitpack.io/com/github/ZLYang110/TitleBar/1.0.1/TitleBar-1.0.1.aar'. Received status code 521 from server:
小米手机 Android11系统 无法读取到Android/data/下面的文件
我加到项目里显示标题颜色是透明的,文字是白色的,看着很费劲,请问您这边库里可以固定一个颜色吗
Android5.1
文件夹里就两个文件,点进去后,上面显示了两个文件,但是外部的文件夹列表还是能看到,再划一划,正在加载的蓝色区域未消失
Android 11 加载不出来文档
在 iqoo11 手机上出现的问题bugly报错
在多文件的情况下,在root路径的时候,加载的时间会比较长,而且不加载完成后,路径是不显示的,这种情况体验不是很好,可以改成先显示路径后,再开始加载路径下的文件,还可以在扫描的时候,扫描完路径下的一个文件夹或者文件就添加到显示列表上,而不是扫描完后再一并显示,这样线程的消耗会小一点,并行也会小一点。
@OverRide
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
if (adapter.equals(mBreadAdapter) && view.getId() == R.id.btn_bread) {
//点击某个路径时
}
}
触发不了这个点击事件
升级一下glide吧
配置FileSelector时,setTargetPath设置了目录,但打开的仍然是root目录
FileSelector.from(this)
.onlyShowFolder() //只显示文件夹
.onlySelectFolder() //只能选择文件夹
.isSingle() // 只能选择一个
.setSortType(FileSelector.BY_TIME_ASC) //设置时间排序
.requestCode(999) //设置返回码
.setTargetPath("/storage/emulated/0/Android/")
.start();
可以提供设置中间和右边文字吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.