I'm not sure, but can't you call `.length()` directly on the `EditText`?