Reputation: 23
TextUtil.isEmpty() is always returning empty, even when the field is filled in the Android. Code snippet:
if (TextUtils.isEmpty(name.getText().toString())) { completeNameEditText.setError("Empty field); Toast.makeText(getApplicationContext(), "Empty field", Toast.LENGTH_LONG).show(); return; }
The problem is that, even filling all the EditText with Strings, always points to the error: "Empty field".
Please, what to do to fix this?
Upvotes: 0
Views: 113