I started a few days to learn android development, I am trying to create a simple login system for testing only. But when I create an event for the login button, the EditText string comparison does not work. When I click the button it goes to the 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();
}
}