Skip to content

Instantly share code, notes, and snippets.

@ismailgungor
Created April 11, 2019 15:09
Show Gist options
  • Save ismailgungor/5990d6f158b7da1c02b36d4121bddeab to your computer and use it in GitHub Desktop.
Save ismailgungor/5990d6f158b7da1c02b36d4121bddeab to your computer and use it in GitHub Desktop.
class SplashActivity : AppCompatActivity(), SplashActivityContract.View {
private lateinit var progressView: SpinKitView
@Inject
lateinit var mPresenter: SplashActivityPresenter
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_splash)
DaggerSplashActivityComponent.builder()
.appModule(AppModule(this))
.intentModule(IntentModule())
.splashActivityModule(SplashActivityModule())
.build().inject(this)
this.mPresenter.setView(this)
this.mPresenter.create()
}
override fun bindViews() {
this.progressView = findViewById(R.id.sk_progress)
}
override fun showProgress() {
this.progressView.visibility = View.VISIBLE
}
override fun hideProgress() {
this.progressView.visibility = View.GONE
}
override fun finishActivity() {
this.finish()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment