22 Star 94 Fork 17

mxy0903 / Multi_image_selector_from_Github

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Multi_image_selector_from_Github

Github上非常强大的仿微信图片选择器,只因作者不再更新了,所以做了搬运, 1.将原有加载图片的Picasso框架替换成了Glide v3.7 ,效率上有所提高, 2.加入了Android 6.0系统运行时权限模式 3.修改拍照调用方式,使用了FileProvider技术,适配Android 7.0+

注:目前仅适配api:16(android 4.1)及已上,如需适配Android 4.1以下系统版本,请您自行下载源码修改并测试

附上调用方法:

/**
 * 调起选择图片
 */
private void chosePhoto() {
    Intent intent = new Intent();
    intent.setClass(this, MultiImageSelectorActivity.class);
    // 是否显示拍摄图片
    intent.putExtra(MultiImageSelectorActivity.EXTRA_SHOW_CAMERA, true);
    // 最大可选择图片数量
    intent.putExtra(MultiImageSelectorActivity.EXTRA_SELECT_COUNT, 6);
    // 选择模式  单张图片模式  imageselector还支持多张选择,需要将已经选择过的图片传过去
    intent.putExtra(MultiImageSelectorActivity.EXTRA_SELECT_MODE, 0);
    //传入已选图片集合   注:要传uri  file://   不是绝对路径
    //intent.putExtra(MultiImageSelectorActivity.EXTRA_DEFAULT_SELECTED_LIST, photolist);
    //启动选择图像界面
    startActivityForResult(intent, 999);
}

update Gradle to 4.1

MultiImageSelectorActivity在manifest文件中的launchMode不能设置成singleTask,这会导致在Android 5.0以下版本中,启动者的OnActivityForResult方法被立即实行,从而无法接受到用户所选或拍照的图片地址。 慎用singleTask模式

The MIT License (MIT) Copyright (c) 2015 Nereo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Github上非常强大的图片选择器,只因作者不再更新了,所以做了搬运,将原有显示图片的Picasso框架替换成了glide v3.7 ,效率上有所提高,并且修改了拍照调起方式,使用了FileProvider技术,适配Android 7.0 展开 收起
Android
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Android
1
https://gitee.com/maxiaoyong/Multi_image_selector_from_Github.git
git@gitee.com:maxiaoyong/Multi_image_selector_from_Github.git
maxiaoyong
Multi_image_selector_from_Github
Multi_image_selector_from_Github
master

搜索帮助