0
I started a few days learning android development, I’m trying to create a simple login system just for testing. Only when I create an event for the login button the comparison of the Edittext string does not work. When I click the button it goes to Else.
public void exibirMensagem(View view){
edUsuario = (EditText) findViewById(R.id.editText_Usuario);
if(edUsuario.getText().equals("marcio")){
Toast.makeText(MainActivity.this, "Usuário: " + edUsuario.getText(), Toast.LENGTH_LONG).show();
}else{
Toast.makeText(MainActivity.this, "Usuário inválido", Toast.LENGTH_LONG).show();
}
}
Was that right.
– Márcio1994
haha, thanks a friend!
– Thales Augusto
Thank you, thank you!
– Márcio1994