百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

MultiType-FilePicker

> 编程语言
开源

这是一个轻量级的 Android 文件选择器库。

1.4K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

这是一个轻量级的 Android 文件选择器库。

MultiType-FilePicker

This is a light Android file picker library.

Please star this library if you like it. :)

Demo

Usage

1.Import to your project

compile 'com.vincent.filepicker:MultiTypeFilePicker:latestVersion' 

2.Start Activity For Result

case R.id.btn_pick_image:
	Intent intent1 = new Intent(this, ImagePickActivity.class);
	intent1.putExtra(IS_NEED_CAMERA, true);
	intent1.putExtra(Constant.MAX_NUMBER, 9);
	startActivityForResult(intent1, Constant.REQUEST_CODE_PICK_IMAGE);
	break;
case R.id.btn_pick_video:
	intent2 = new Intent(this, VideoPickActivity.class);
	intent2.putExtra(IS_NEED_CAMERA, true);
	intent2.putExtra(Constant.MAX_NUMBER, 9);
	startActivityForResult(intent2, Constant.REQUEST_CODE_PICK_VIDEO);
	break;
case R.id.btn_pick_audio:
	Intent intent3 = new Intent(this, AudioPickActivity.class);
	intent3.putExtra(IS_NEED_RECORDER, true);
	intent3.putExtra(Constant.MAX_NUMBER, 9);
	startActivityForResult(intent3, Constant.REQUEST_CODE_PICK_AUDIO);
	break;
case R.id.btn_pick_file:
	Intent intent4 = new Intent(this, NormalFilePickActivity.class);
	intent4.putExtra(Constant.MAX_NUMBER, 9);
	intent4.putExtra(NormalFilePickActivity.SUFFIX, new String[] {"xlsx", "xls", "doc", "docx", "ppt", "pptx", "pdf"});
	startActivityForResult(intent4, Constant.REQUEST_CODE_PICK_FILE);
	break;

3.Receive the Result from Activity

case Constant.REQUEST_CODE_PICK_IMAGE:
	if (resultCode == RESULT_OK) {
        ArrayList<ImageFile> list = data.getParcelableArrayListExtra(Constant.RESULT_PICK_IMAGE);
    }
    break;
case Constant.REQUEST_CODE_PICK_VIDEO:
	if (resultCode == RESULT_OK) {
        ArrayList<VideoFile> list = data.getParcelableArrayListExtra(Constant.RESULT_PICK_VIDEO);
    }
    break;
case Constant.REQUEST_CODE_PICK_AUDIO:
	if (resultCode == RESULT_OK) {
        ArrayList<AudioFile> list = data.getParcelableArrayListExtra(Constant.RESULT_PICK_AUDIO);
    }
    break;
case Constant.REQUEST_CODE_PICK_FILE:
	if (resultCode == RESULT_OK) {
        ArrayList<NormalFile> list = data.getParcelableArrayListExtra(Constant.RESULT_PICK_FILE);
    }
    break;

Version Log

1.0.0 Initial Version

1.0.1 Fix issue #8 and enhance URL extract

1.0.2 Add resource prefix and update library version

1.0.3 Modify fetching video thumbnail rule

1.0.4 Fix "Attempted to access a cursor after it has been closed" in "onVideoResult"

1.0.5 Use Glide to load video thumbnail, delete record in Media DB when user cancel taking photo and add prefix to resources

1.0.6 Add folder feature

1.0.7 Upgrade to Glide 4

1.0.8 Fix provider crash on Android 7.0 above

Thanks

Inspired by Android-FilePicker

Image Viewer provide by PhotoView

Image Loader provide by Glide

License

Copyright 2016 Vincent Woo

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javafile-explorerpickerpicker-componentpicker-library

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言