Skip to content

Instantly share code, notes, and snippets.

@digitalbuddha
Last active December 14, 2017 00:11
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 digitalbuddha/e57c72782a536a804f3a61d639353e54 to your computer and use it in GitHub Desktop.
Save digitalbuddha/e57c72782a536a804f3a61d639353e54 to your computer and use it in GitHub Desktop.
class ScreenModule(){
@Binds
@IntoSet
Presenter()=LandingPresenter;
@Binds
@IntoSet
Presenter()=SuccessPresenter;
}
@Layout(id = R.id.landing)
class LandingPresenter(){
val landingView:LandingView by InflatorDelegate{view = inflator.inflateAndAttachToRoot(layoutFromAnnotation(); attachView(view) return view} //make a delegate
init{
dispatcher
.showLanding()
.subscribe{landingView.showYoSelf())
}
}
class Activity(){
@Inject lateinit presenters: Set<Presenter> //will init each presenter subscribing to dispatcher
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment