I am trying to compare the text of a label with that written in a text field, in Android Studio, specifically a TextView and an EditText, I explain:
if (etInfinitivo.getText().toString().equals(tvVTE.getText().toString()))
{
tvVTE.setText("correcto");
}
Where the variables correspond to:
TextView tvVTE = (TextView) findViewById(R.id.txtVTE);
EditText etInfinitivo = (EditText) findViewById(R.id.txtInfinitivo);
Well, I run the application, I copy the content of the tag (txtVTE) in the text box (txtInfinitivo) and when I press the button, and I get to the first code that I have exposed, if it is not executed, the two chains are not the same.
Can you think of what it may be?