use of dagger.Provides in project DevRing by LJYcoder.
the class MovieActivityModule method playingMovieFragment.
@ActivityScope
@Provides
@Named("playing")
MovieFragment playingMovieFragment() {
Bundle bundle = new Bundle();
bundle.putInt("type", MovieFragment.TYPE_PLAYING);
MovieFragment fragment = new MovieFragment();
fragment.setArguments(bundle);
return fragment;
}
use of dagger.Provides in project bugzy by cpunq.
the class NetModule method provideFogBugzService.
@Provides
@Singleton
FogbugzApiService provideFogBugzService(Application application, PrefsHelper prefsHelper, Gson gson) {
OkHttpClient.Builder httpClient = new OkHttpClient.Builder();
Retrofit.Builder builder = new Retrofit.Builder().baseUrl(mBaseUrl).addCallAdapterFactory(new LiveDataCallAdapterFactory(gson)).addConverterFactory(GsonConverterFactory.create(gson));
Retrofit retrofit = builder.client(httpClient.addInterceptor(new ConnectivityInterceptor(application.getApplicationContext())).addInterceptor(new RequestInterceptor(prefsHelper)).build()).build();
return retrofit.create(FogbugzApiService.class);
}
Aggregations