Skip to content

Instantly share code, notes, and snippets.

@LiewJunTung
Last active April 8, 2019 06:05
Show Gist options
  • Save LiewJunTung/248bd075115c6dc71bcae806ad124e9c to your computer and use it in GitHub Desktop.
Save LiewJunTung/248bd075115c6dc71bcae806ad124e9c to your computer and use it in GitHub Desktop.
package com.netvirta.android.login
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import com.netvirta.android.R
import com.netvirta.common.login.LoginPresenter
import com.netvirta.common.login.LoginPresenterImpl
import com.netvirta.common.login.LoginView
import kotlinx.android.synthetic.main.activity_login.*
class LoginActivity : AppCompatActivity(), LoginView {
lateinit var presenter: LoginPresenter
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_login)
presenter = LoginPresenterImpl(this)
submitButton.setOnClickListener {
presenter.processLogin(editText.text.toString())
}
}
override fun loginResult(result: String) {
textView.text = result
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment