Skip to content

Instantly share code, notes, and snippets.

@akarnokd
Created January 30, 2020 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akarnokd/25b042ca3008e3729c6064c89ef4b7ae to your computer and use it in GitHub Desktop.
Save akarnokd/25b042ca3008e3729c6064c89ef4b7ae to your computer and use it in GitHub Desktop.
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