Created
April 11, 2019 15:09
-
-
Save ismailgungor/5990d6f158b7da1c02b36d4121bddeab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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