Created
January 30, 2020 09:23
-
-
Save akarnokd/25b042ca3008e3729c6064c89ef4b7ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LiveData<List<Integer>> ld = LiveDataReactiveStreams.fromPublisher( | |
Flowable.range(1, 5) | |
.delay(500, TimeUnit.MILLISECONDS) | |
.toList() | |
.toFlowable() | |
); | |
Log.d("TAG", "Sleep"); | |
try { | |
Thread.sleep(1000); | |
} catch (InterruptedException e) { | |
e.printStackTrace(); | |
} | |
ld.observe(this, o -> { | |
Log.d("TAG", o.toString()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment