Search in sources :

Example 1 with ActivityScope

use of com.ljy.devring.di.scope.ActivityScope in project DevRing by LJYcoder.

the class MovieActivityModule method commingMovieFragment.

@ActivityScope
@Provides
@Named("comming")
MovieFragment commingMovieFragment() {
    Bundle bundle = new Bundle();
    bundle.putInt("type", MovieFragment.TYPE_COMMING);
    MovieFragment fragment = new MovieFragment();
    fragment.setArguments(bundle);
    return fragment;
}
Also used : Bundle(android.os.Bundle) MovieFragment(com.dev.base.mvp.view.fragment.MovieFragment) Named(javax.inject.Named) ActivityScope(com.ljy.devring.di.scope.ActivityScope) Provides(dagger.Provides)

Example 2 with ActivityScope

use of com.ljy.devring.di.scope.ActivityScope 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;
}
Also used : Bundle(android.os.Bundle) MovieFragment(com.dev.base.mvp.view.fragment.MovieFragment) Named(javax.inject.Named) ActivityScope(com.ljy.devring.di.scope.ActivityScope) Provides(dagger.Provides)

Aggregations

Bundle (android.os.Bundle)2 MovieFragment (com.dev.base.mvp.view.fragment.MovieFragment)2 ActivityScope (com.ljy.devring.di.scope.ActivityScope)2 Provides (dagger.Provides)2 Named (javax.inject.Named)2