Hello! The considered EditText is for TIN input, therefore inputType = number. It is clear that you need to check the number of characters entered (in this case - numbers).
I check through editText.getText (). ToString (). Length () - honestly, I do not know.
But then a small ambush caught - the TIN may include 0 (zeros), which .length () does not take into account when counting the number of characters.
How to determine the number of characters with these zeros? Google did not help.