by wqandroid

wqandroid /wqgallery

android 相册支持单选模式和多选模式

427 Stars 116 Forks Last release: over 4 years ago (3.1.0) 37 Commits 2 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:




Image text




第一步 在项目的 build.gradle 添加dependencies
repositories {
 maven { url "https://jitpack.io" }

dependencies { compile 'com.github.wqandroid:wqgallery:3.1.0' }

第二步 调用相册选择器
 UCrop.Options options = new UCrop.Options();

new PickConfig.Builder(MainActivity.this) .maxPickSize(9)//最多选择几张 .isneedcamera(true)//是否需要第一项是相机 .spanCount(4)//一行显示几张照片 .actionBarcolor(Color.parseColor("#E91E63"))//设置toolbar的颜色 .statusBarcolor(Color.parseColor("#D81B60")) //设置状态栏的颜色(5.0以上) .isneedcrop(false)//受否需要剪裁 .setUropOptions(options) //设置剪裁参数 .isSqureCrop(true) //是否是正方形格式剪裁 .pickMode(PickConfig.MODE_MULTIP_PICK)//单选还是多选 .build();

第三步 在onActivityResult中获取选择的图片路径列表
 if(resultCode==RESULT_OK && requestCode == PickConfig.PICK_REQUEST_CODE){
        //在data中返回 选择的图片列表

Version 3.1.1

 1.0.1 新增单选截图模式
 1.0.2 修改一些bug,以及样式
 2.0.0 修改之前遗留的一些bug,加载图片换成了glide
 2.1.0 修改了配置选择的代码 支持自定义一行显示几张
 2.2.0 修改没有数据的异常
 3.0.0 修改Actionbar问题,支持Crop
 3.1.0 修复在三星手机拍照旋转导致获取图片失败的bug
 3.1.1 修复一些异常


  • Glide A powerful image downloading and caching library for Android
  • uCrop 感谢uCrop 作者,当前库的剪裁采用uCrop

Developed By

[email protected]

sinaweibo *ios_android技术宅拯救世界


Copyright 2013 Andreas Stuetz

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


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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.