민프

[Android][Kotlin] EditText 입력 변경 이벤트 (addTextChangedLitener) 본문

[Android]

[Android][Kotlin] EditText 입력 변경 이벤트 (addTextChangedLitener)

민프야 2021. 9. 25. 12:56
 view.findViewById<EditText>(R.id.editText_initSetAvartarNickname_edit).addTextChangedListener(object: TextWatcher{
            override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
            }

            override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
                Log.d(TAG+ " onTextChanged",p0.toString())
           }
 
            override fun afterTextChanged(p0: Editable?) {
                Log.d(TAG+ " afterTextChanged",p0.toString())

            }

        })
Comments