manas-chaudhari / android-mvvm

MVVM on Android using RxJava and Data Binding
Apache License 2.0
501 stars 81 forks source link

RxJava2 Support #41

Closed jossiwolf closed 7 years ago

jossiwolf commented 7 years ago

Hello, are you planning to add RxJava2 support? If yes, any ETA yet?

manas-chaudhari commented 7 years ago

Yes, its on my list. I'll try to finish it over this weekend. Worst case: next week.

manas-chaudhari commented 7 years ago

@jossiwolf I am prioritizing #40 over this. With this new structure, Rx support would be separated into a separate module. After that, it would be easy to add another module for rxjava2 support. What do you think?

jossiwolf commented 7 years ago

@manas-chaudhari Sounds like a good move. Having a structured codebase is important. Take your time!

tvaamorim commented 7 years ago

Hey @manas-chaudhari thanks for the project. I'm starting now with Rx and MVVM. Seen your video at Droid Connin do you use a converter from ObservableField to Observable. Here it is at file "FieldUtils". How can I convert it to the rx2?

any ETA to this project with rx2?

Thanks

manas-chaudhari commented 7 years ago

@tvaamorim Yes, you are right about FieldUtils.

I have started working on RxJava 2 support. The plan is to primarily support only RxJava 2, with an optional module to support RxJava 1 via RxJava2Interop. My target is to complete this by March 5th.

Until then, I recommend that you create your own wrapper over FieldUtils using RxJava2Interop. This wrapper would convert between rx2.Observable <-> databinding.ObservableField. For working with RecyclerView/ViewPager, you can add a BindingConversion for rx2.Observable -> rx1.Observable.

tvaamorim commented 7 years ago

@manas-chaudhari thanks for the fast response.

I will take a look at RxJava2Interop.

Thanks. Please keep with this awesome project. It helped me a lot ;D

mike-mathieu commented 7 years ago

Hey @manas-chaudhari great job so far and thanks for the library.

@jossiwolf and @tvaamorim I have forked this library and built an RxJava2 version that you may use in the meantime. Feel free to check it out. I've added a few things as well.

tvaamorim commented 7 years ago

@bigmikehoncho awesome man!! exactly what I need! Checking the project right now =D

Thanks for sharing it.

manas-chaudhari commented 7 years ago

RxJava2 support has been released :) Do note the maven coordinate changes as mentioned in changelog