GithubHelp home page GithubHelp logo

yubowengod / imageselect Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jackliaojh/imageselect

0.0 1.0 0.0 2.07 MB

android 经量级选择图片框架,支持拍照,获取相册图片,可以多选,单选

Java 100.00%

imageselect's Introduction

ImageSelect

android 经量级选择图片框架,支持拍照,获取相册图片,可以多选,单选

声明

此框架是基于lovetuzitong大大的MultiImageSelector框架修改而来的,主要的修改有以下几点:

  1. 新增对图片列表展示的个数;
  2. 将图片的加载框架替换替换成了Glide,优化了加载图片速度;
  3. 新增多图选择时,点击图片进入产看图片模式,方便预览;
  4. 集成5.0以上权限处理问题。

效果

列表效果 图片详情

Get it

  • Step1: Add it in your root build.gradle at the end of repositories:

      allprojects {
      	repositories {
      		...
      		maven { url "https://jitpack.io" }
      	}
      }
    
  • Step2 : Add the dependency

      dependencies {
              compile 'com.github.JackLiaoJH:ImageSelect:v1.0.0'
      }
    

使用

简单使用

ImageSelector selector = ImageSelector.create();
    // selector.single();  // single mode
    selector.multi();  // multi mode, default mode;
    selector.origin(mSelectPath) // original select data set, used width #.multi()
            .showCamera(showCamera)   // show camera or not. true by default
            .count(maxNum)   // max select image size, 9 by default. used width #.multi()
            .spanCount(imageSpanCount)  // image span count ,default is 3.
            .start(MainActivity.this, REQUEST_IMAGE); 

获取结果 override onActivityResult()

ex:
	    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == REQUEST_IMAGE) {
            if (resultCode == RESULT_OK) {
                mSelectPath = data.getStringArrayListExtra(ImageSelector.EXTRA_RESULT);
               // data  ..
            }
        }
    }

detail

使用与这个框架一样:
https://github.com/lovetuzitong/MultiImageSelector

Thanks

thanks lovetuzitong!

License

  /*
 * Copyright (c) 2016 LiaoJH. 
 * Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. 
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. 
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. 
 * Vestibulum commodo. Ut rhoncus gravida arcu. 
 */

imageselect's People

Contributors

jackliaojh 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.