1
I have the following code
static String q1 = "select * from faculdade";
if(edit.getText().toString().equals(q1)) {
bar.setCurrentPosition(++position);
Toast.makeText(getApplicationContext(), "Certa Resposta!", Toast.LENGTH_LONG).show();
}
When I say as stated in the string and press the button, it executes what was requested.
However, if one gives more than 2 spaces or puts a comma together or separated, he does not recognize. It only works if I type much like the variable. How do I get around it ? Thanks to anyone who can help.
Could you for an example of how I would put ? I have never used Trim ()
– Luciana Freire Efelipe Correia
@Lucianafreireefelipecorreia use:
edit.getText().toString().trim().equals(q1)
;)– itscorey
I came back to thank people. thank you very much. replaceAll worked.
– Luciana Freire Efelipe Correia