hello . at first i would suggest debugging your project. it helps you to find your problem but if you dont want to do it you can use this piece of code which shows you how to act .
java code :
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void method1(View v){
String Word="a";
String etValue="";
EditText et=(EditText)findViewById(R.id.et1);
etValue=et.getText().toString();
if(etValue.equals("a")){
Toast.makeText(this, "it works fine", Toast.LENGTH_LONG).show();
}
else{
Toast.makeText(this, "insert the correct word ! ", Toast.LENGTH_LONG).show();
}
}
}