Comments (3)
非常感谢这么有心的作者
from rximagepicker.
用您SystemActivity.java里的代码没问题
from rximagepicker.
感谢您选择使用RxImagePicker:thumbsup:
RxImagePicker 底层通过使用 动态代理 生成 MyImagePicker 接口的对象,因此您不需要让 Activity 实现 MyImagePicker 接口。
您只需要将MyImagePicker.class 作为参数,传给 RxImagePicker.Builder,框架会 自动生成 MyImagePicker的对象,比如,您在您的Activity的onCreate()方法中初始化MyImagePikcer:
MyImagePicker imagePicker = new RxImagePicker.Builder()
.with(this)
.build()
.create(MyImagePicker.class);
这之后,如果您想打开相册,只需要像您代码写的一样:
@Override
public void onClick(View v) {
imagePicker.openGallery()
.subscribe(new Consumer<Uri>() {
@Override
public void accept(Uri uri) throws Exception {
Glide.with(MainActivity.this) .load(uri).into(iv_show);
}
});
}
为什么imagePicker.openGallery() 就能够知道我是想要打开相册呢,因为通过注解,您已经将您这个方法想做的事告诉了 RxImagePicker框架:
public interface MyImagePicker {
@Gallery //给这个方法加上这个注解,就是告诉框架您想要打开相册选择图片
Observable<Uri> openGallery();
}
请您参考sample再次尝试,如果有疑问欢迎在本issue中提出 😄.
from rximagepicker.
Related Issues (20)
- 请问怎么控制打开选择activity的动画,比如从下往上弹起选择页面
- com.github.qingmei2:rximagepicker_support_wechat:2.5.6. Using this dependency gives error HOT 4
- 某些机型排序与系统相册排序不一致,从别的应用保存的图片不显示在最前方
- 图片加载引擎
- 使用系统相册多选怎么配置? HOT 1
- 屏幕旋转会崩溃 HOT 3
- 知乎主题图片选择器崩溃 HOT 4
- Unable to start activity 后台收集到崩溃日志,内容如下:有没有谁也遇到过该问题? HOT 10
- 如果带鲁班压缩就更好了
- bugly上崩溃日志java.lang.IllegalStateException cursor.getString(cursor.…UMN_BUCKET_DISPLAY_NAME)) must not be null HOT 2
- sync没问题,运行后报错 HOT 2
- bugly报错 HOT 1
- 已经选择的图片 如何再次回显到相册里
- 相机拍摄不会出现在Gallery里面
- 2.2.0版本自定义UI会闪退
- 请问有计划不使用rxjava 得版本嘛? 好像现在用kotlin不需要用到rxjava了 HOT 1
- fragment transaction error(?) issue(?) using androidx.fragment.app:1.3.0-alpha08
- 希望能有个 androidX 版本 HOT 1
- 希望出RxJava3的正式版
- 相机权限问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rximagepicker.