The problem in EditText is, it is not returning the input value.I am using that input value to check condition.

I am giving the correct input so that i checks the if condition and go to next activity but
it always goes to else condition.

Please check the code below, i had commented the problem.

Here is the snippet

```
public class BuildWord extends Activity
{
String word = "word";
String finished = "Word Built";

@Override
public void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.buildword);

    EditText get = (EditText)findViewById(R.id.dataToSend);
    String getdata = get.getText().toString(); //Here i am getting Data from EditText

    displayIntentData();

    if (getdata.equals("word")) 

    //Here i am checking with "word" but it goes to else condition.I am typing "word" only
    {
        findViewById(R.id.sendButton1).setOnClickListener(new OnClickListener() 
        {   
            public void onClick(View v) 
            {
                Intent intent = new Intent(BuildWord.this,MainActivity.class);
                intent.putExtra("key", word);
                startActivity(intent);

            }
        });
    }
    else
    {
        findViewById(R.id.sendButton1).setOnClickListener(new OnClickListener() 
        {   
            public void onClick(View v) 
            {
                Intent intent = new Intent(BuildWord.this,DropCard.class);
                intent.putExtra("key", finished);
                startActivity(intent);                  
            }
        });
    }
}

@Override
protected void onNewIntent(Intent intent) 
{
    super.onNewIntent(intent);
    setIntent(intent);
    displayIntentData();
}

private void displayIntentData()
{
    Intent intent = getIntent();
    TextView tv = (TextView)findViewById(R.id.intentData1);
    Bundle extras=intent.getExtras();

    if(extras!=null)
    {
        tv.setText("Data received: "+extras.getString("key"));
    }
    else
    {
        tv.setText("No extradata received");
    }
}

```

}