首页 » Andorid » 临时分类 » 正文

Github

Github

Android app on Google Play

This Github android sample application can give you a quick summary of your github repos.

Alt sample Alt sample

Dagger2

@Singleton
@Component(modules = {GithubModule.class, ContextModule.class})
public interface GithubComponent {

    GithubAPI githubApi();
    RepoManager repoManager();
    UserManager userManager();

    void inject(MainActivity mainActivity);
    void inject(ListRepoFragment listRepoFragment);
    void inject(ListEventFragment listEventFragment);
}

RxAndroid & RetroLambda

Using the github API with Retrofit

githubAPI.userEvents(userManager.getUser().getLogin())
                    .observeOn(AndroidSchedulers.mainThread())
                    .onErrorReturn(null)
                    .subscribe(events -> {
                        if (events != null) carpaccio.mapList("event", events);
                    });

Carpaccio













下载 (0)

发表评论