Skip to content

Instantly share code, notes, and snippets.

@ismailgungor
Last active April 11, 2019 15:03
Show Gist options
  • Save ismailgungor/0d74cef8b098ba8873365a5e96f18d67 to your computer and use it in GitHub Desktop.
Save ismailgungor/0d74cef8b098ba8873365a5e96f18d67 to your computer and use it in GitHub Desktop.
class SplashActivityPresenter @Inject constructor() : SplashActivityContract.Presenter {
private lateinit var mView: SplashActivityContract.View
@Inject
lateinit var mHandlerProcessManagement: HandlerProcessManagement
@Inject
lateinit var mIntentHelper: IntentHelper
override fun setView(view: SplashActivityContract.View) {
this.mView = view
}
override fun create() {
this.mView.bindViews()
this.mView.showProgress()
this.mHandlerProcessManagement.providePostDelayedHandler(object : HandlerCallback {
override fun onCompleted() {
mView.hideProgress()
mIntentHelper.intentToMainActivity()
mView.finishActivity()
}
}, HandlerProcessManagement.DEFAULT_HANDLER_DURATION)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment