项目地址:github项目传送门
先上图:


使用方法
FileSelector.create(this)
.isChooseFile(true)//设置是选择文件还是文件夹
.setMaxNum(maxnum)//设置选择最大数量
.setTitle(title)//设置title
.setMutilyMode(true)//设置选择模式:true为多选,false为单选
.setRootPath(rootPath)//设置需要选择的文件路径,默认为根路径
.setMaxFileSize(100 * 1024 * 1024)//设置可以选择文件大小的最大值
.setFileFilter(new String[]{"pdf", "doc", "docx","txt","png","mp4"})//设置过滤需要保留的扩展名
.startForResult(REQUESTCODE);//打开文件选择界面
感兴趣的下载项目研究下:github项目传送门
网友评论