Git Product home page Git Product logo

galleryfinal's Introduction

GalleryFinal简介

Android相册自定义,包括拍照、图片选择(单选/多选)和裁剪。

##为什么要使用GalleryFinal?

  • 拍照/选择图片倒立问题
  • 市场上各种相机和图片浏览器泛滥和各种异常问题
  • 各种手机兼容性问题引起crash
  • 系统Gallery App不能进行多选
  • 拍照/选择图片/裁剪视乎不太好用
  • 系统Gallery App不美观
  • ……

#GalleryFinal使用方法

##下载GalleryFinal 通过Gradle抓取:

compile 'cn.finalteam:galleryfinal:1.0.2'

##截图展示 Demo apk二维码地址:DEMO APK

##具体使用 1、通过gradle或jar把GalleryFinal添加到你的项目里

2、你的项目必须实现ImageLoader接口(demo中有Universal-Image-Loader实现方法)

public class GalleryImageLoader implements cn.finalteam.galleryfinal.ImageLoader {
    
    @Override
    public void displayImage(final ImageView imageView, String url) {
        DisplayImageOptions options = new DisplayImageOptions.Builder()
                .cacheInMemory(false)
                .cacheOnDisk(false)
                .bitmapConfig(Bitmap.Config.RGB_565)
                .build();
        ImageLoader.getInstance().displayImage(url, imageView, options);
    }
}

3、打开相册(拍照、选择图片)

  • 单选
GalleryHelper.openGallerySingle(context, crop, new GalleryImageLoader());

第一个参数Context,第二个参数是否裁剪,第三个参数图片加载实现类

  • 多选
GalleryHelper.openGalleryMuti(context, limit, new GalleryImageLoader());

第一个参数Context,第二个参数是选择数量,第三个参数图片加载实现类

4、配置GalleryFinal Activity样式

  • 在styles.xml中添加
    <style name="PhotoActivityTheme">
        <item name="colorTheme">@color/colorPrimary</item>
        <item name="colorThemeDark">@color/colorPrimaryDark</item>
    </style>

colorTheme为主题色,colorThemeDark为主题加深色

5、如果你还想更深度的定制页面效果可以把资源文件名字定义成Gallery资源名已达到覆盖效果。如有不理解可以联系我。

#混淆配置

-keep class cn.finalteam.galleryfinal.widget.*{*;}
-keep class cn.finalteam.galleryfinal.model.*{*;}

License

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.

galleryfinal's People

Contributors

pengjianbo avatar

Stargazers

Vincent avatar 嗯咯 avatar charming avatar Qifa avatar

Watchers

James Cloos 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.