title: can't get data from edit text, Android Kotlin
body: <p>I got null data when try to get data from edittext
  there is my code</p>
  
  <pre><code>class LoginActivity : AppCompatActivity() {
  lateinit var etUsername : EditText
  lateinit var etPassword : EditText
  var username = ""
  var password = ""
  override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
      setContentView(R.layout.activity_login)
      etPassword = findViewById(R.id.tanggalLahir) as EditText
      etUsername = findViewById(R.id.nomerInduk) as EditText
      username = etUsername.text.toString()
      password = etPassword.text.toString()
  
      buttonLogin.setOnClickListener() {
          if (username.isEmpty()){
              Log.d("User", "Username = $username")
              nomerInduk.error = "Nomor Induk Kosong!"
              return@setOnClickListener
          }
  
          if (password.isEmpty()){
              Log.d("User", "Password = $password")
              tanggalLahir.error = "Tanggal Lahir Kosong!"
              return@setOnClickListener
          }
  
          login(username,password)
      }
  
  
  }
  </code></pre>
  
  <p>and there is when i check in log
  <a href="https://i.stack.imgur.com/H769C.png" rel="nofollow noreferrer">image check log</a></p>
  
  <p>i already change edittext to textinputedittext but still same</p>