Skip to content

Instantly share code, notes, and snippets.

@suciptoid
Created August 1, 2016 15:13
Show Gist options
  • Save suciptoid/212d7a9c929745761b30b045e5e1337a to your computer and use it in GitHub Desktop.
Save suciptoid/212d7a9c929745761b30b045e5e1337a to your computer and use it in GitHub Desktop.
Setelah ambil data dari API
service.getRepos("showcheap")
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<List<GithubRepo>>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(List<GithubRepo> githubRepos) {
repoObservable = Observable.from(githubRepos);
Log.d("getRepos:onNext",githubRepos.toString());
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment