I am trying to check if text in editText is equal to some string. This is my if (it comes every time i press a button):
if(tx.getText().toString()=="bla")
this is tx:
tx=(EditText)findViewById(R.id.editText1);
I don't know why but the if is never true, I tried to check it by toast this way:
Toast.makeText(getApplicationContext(),tx.getText().toString(), Toast.LENGTH_LONG).show();
and it is "bla" but still its false, why?