Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imuhao/RxPicker
The ImageSelect tool based on RxJava.
https://github.com/imuhao/RxPicker
Last synced: 3 months ago
JSON representation
The ImageSelect tool based on RxJava.
- Host: GitHub
- URL: https://github.com/imuhao/RxPicker
- Owner: imuhao
- Created: 2017-04-20T11:33:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-11T09:47:52.000Z (about 6 years ago)
- Last Synced: 2024-06-16T05:35:12.543Z (5 months ago)
- Language: Java
- Homepage:
- Size: 3.63 MB
- Stars: 349
- Watchers: 9
- Forks: 40
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-android-ui - RxPicker - 基于RxJava的Android图片选择器. (图片)
README
# RxPicker
The ImageSelect tool based on RxJava.[中文文档](./README_CN.md)
## Feature
1. Combined with RxJava , Supper observer pattern to get result
2. Compatible with Android 7.0
3. Custom Image Loader## Preview
## Use Glide
1.Add gradle:
```
compile 'com.caimuhao:rxpicker:1.1.5'
```2.Extends `RxPickerImageLoader` create custom ImageLoader
```
public class GlideImageLoader implements RxPickerImageLoader {@Override public void display(ImageView imageView, String path, int width, int height) {
Glide.with(imageView.getContext())
.load(path)
.error(R.drawable.ic_preview_image)
.centerCrop()
.override(width, height)
.into(imageView);
}
}
```3.Initialize RxPicker
```
RxPicker.init(new GlideImageLoader());
```4.Use
- Single Image
```
RxPicker.of().start(this).subscribe(new Consumer>() {
@Override public void accept(@NonNull List imageItems) throws Exception {
//Get the result
}
});
```- Multiple Images
```
RxPicker.of()
.single(false)
.camera(true)
.limit(3,9)
.start(this)
.subscribe(new Consumer>() {
@Override public void accept(@NonNull List imageItems) throws Exception {
//Get the result
}
});
```