GeezerVison is showing github.com — feat: remove direct Rx 1.X dependencies · codeteo/RxJava-Android-Samples@9a5f53b
File treeExpand file treeCollapse file tree Open diff view settings src/main/java/com/morihacky/android/rxjava/fragments
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: app/build.gradle +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -38,14 +38,13 @@ dependencies { | 38 | 38 | compile "com.squareup.okhttp3:okhttp-urlconnection:${okhttpVersion}" | 39 | 39 | compile 'com.mcxiaoke.volley:library:1.0.19' | 40 | 40 |
| 41 | | - // ----------- Rx dependencies | | 41 | + // ---------------------------------- | | 42 | + // Rx dependencies | 42 | 43 |
| 43 | | - compile 'io.reactivex:rxjava:1.1.4' | 44 | 44 | compile 'io.reactivex.rxjava2:rxjava:2.0.1' | 45 | 45 |
| 46 | 46 | // Because RxAndroid releases are few and far between, it is recommended you also | 47 | 47 | // explicitly depend on RxJava's latest version for bug fixes and new features. | 48 | | - compile 'io.reactivex:rxandroid:1.2.0' | 49 | 48 | compile 'io.reactivex.rxjava2:rxandroid:2.0.1' | 50 | 49 |
| 51 | 50 | // libs like rxbinding + rxjava-math haven't been ported to RxJava 2.x yet, so this helps | @@ -56,6 +55,7 @@ dependencies { | 56 | 55 | compile 'com.jakewharton.rxbinding:rxbinding:0.2.0' | 57 | 56 | compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0' | 58 | 57 |
| | 58 | + // ---------------------------------- | 59 | 59 |
| 60 | 60 | debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3' | 61 | 61 | releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3' | |
Collapse file Copy file name to clipboardExpand all lines: app/src/main/java/com/morihacky/android/rxjava/fragments/PlaygroundFragment.java +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 15 | 15 | import butterknife.ButterKnife; | 16 | 16 | import butterknife.OnClick; | 17 | 17 | import com.morihacky.android.rxjava.R; | | 18 | +import io.reactivex.Observable; | | 19 | +import io.reactivex.android.schedulers.AndroidSchedulers; | | 20 | +import io.reactivex.schedulers.Schedulers; | 18 | 21 | import java.util.ArrayList; | 19 | 22 | import java.util.Arrays; | 20 | 23 | import java.util.List; | 21 | 24 | import java.util.concurrent.TimeUnit; | 22 | | -import rx.Observable; | 23 | | -import rx.android.schedulers.AndroidSchedulers; | 24 | | -import rx.schedulers.Schedulers; | 25 | 25 | import timber.log.Timber; | 26 | 26 |
| 27 | 27 | public class PlaygroundFragment | @@ -61,7 +61,7 @@ public void startOperation() { | 61 | 61 | _logs.clear(); | 62 | 62 | _log("Button Clicked"); | 63 | 63 |
| 64 | | - Observable.from(Arrays.asList("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l"))// | | 64 | + Observable.fromIterable(Arrays.asList("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l"))// | 65 | 65 | .flatMap(s1 -> { | 66 | 66 |
| 67 | 67 | _log(s1 + "start"); | |
|