Git Product home page Git Product logo

wqgallery's Introduction

#微信样式相册选择器

####下面是效果图

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();
 //图片生成格式
 options.setCompressionFormat(Bitmap.CompressFormat.JPEG);
 //图片压缩比
 options.setCompressionQuality(seekBar.getProgress());

 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中返回 选择的图片列表
        ArrayList<String>paths=data.getStringArrayListExtra("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 修复一些异常

###Thanks

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

##Developed By #####[email protected] ####sinaweibo *ios_android技术宅拯救世界 ##License

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

   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.

wqgallery's People

Contributors

wqandroid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.