Skip to content

Instantly share code, notes, and snippets.

@TheDancerCodes
Last active July 23, 2020 17:34
Show Gist options
  • Save TheDancerCodes/437ff0b94447231a6b60551bb56eb668 to your computer and use it in GitHub Desktop.
Save TheDancerCodes/437ff0b94447231a6b60551bb56eb668 to your computer and use it in GitHub Desktop.
billEditText.addTextChangedListener(object : TextWatcher {
// Called after the user has changed some text
override fun afterTextChanged(editable: Editable?) {
// Log statement to verify the functionality of this method.
// Log the method name and the value (What the user has been typing).
Log.i(TAG, "afterTextChanged $editable")
computeTipAndTotal()
}
override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {}
override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment