Coder Social home page Coder Social logo

rxpicker's Introduction

RxPicker

超方便的拍照相册选择器,拥有单选、多选、拍照、预览图片缩放等功能。

image

image

配置

1.在project的build.gradle里配置

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

2.在app的build.gradle里配置

implementation 'com.github.yoyoyaobin:RxPicker:1.0.1'

使用方式

获取存储以及相机权限后调用

RxPicker.of()
	.single(false) //是否单张选择
	.camera(true)//是否拥有相机功能
	.limit(1,9)//最少-最多选择数量
	.backgroundColor(android.R.color.black)//整体背景颜色
	.checkBoxColor(android.R.color.holo_red_dark)//图片选中框颜色
	.start(this)//activity or fragment
	.subscribe(new Consumer<List<ImageItem>>() {
	    @Override
	    public void accept(List<ImageItem> imageItems) throws Exception {
		for(ImageItem item:imageItems){
		    Log.i("tag" , "image path:" + item.getPath());
		}
	    }
	});

感谢

本库基于https://github.com/imuhao/RxPicker 修改,新增部分特性以及减少流程,感谢原作者。

rxpicker's People

Contributors

yoyoyaobin avatar

Stargazers

 avatar 快乐小叮当 avatar  avatar  avatar

Watchers

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