I am trying to check if text in editText is equal to some string. This is my if statement (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?