prototypez / sq Goto Github PK
View Code? Open in Web Editor NEW🍨 Comfortable way to use `startActivityForResult` and `onActivityResult` with RxJava!
🍨 Comfortable way to use `startActivityForResult` and `onActivityResult` with RxJava!
为什么SupportActivityResultFragment和ActivityResultFragment使用不同的Subject? 出于什么考虑呢?
你好,demo里发起的Activity被回收后,在返回到发起的Activity时,该Activity是重建后的Activity,它是怎么能继续处理返回的结果的?一直不明白为什么。我自己却不行,我用的是java,难道是Kotlin的黑科技吗? demo能出个java版本的吗? 这个问题一直困扰我...好难受
public static Observable<ActivityResult> startRx(final Fragment fragment, final int requestCode, int maxCount, String target) {
Intent intent = new Intent(fragment.getContext(), TakePhotoWithCropActivity.class);
intent.putExtra(Constants.MAX_SELECT_COUNT, maxCount);
intent.putExtra(Constants.TARGET, target); //目标路径
Sq.startActivityForResult(fragment, intent, requestCode);
return Sq.obtainActivityResult(fragment).filter(new Predicate<ActivityResult>() {
@Override
public boolean test(ActivityResult activityResult) throws Exception {
return activityResult.getRequestCode() == requestCode && activityResult.getResultCode() == RESULT_OK;
}
});
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.