How do I get user input into an EditText field
<p>I am building a larger app and I made this small one just to figure out how to accomplish getting text from user input however it is not working. If I create a string reference at the Text property of my EditText field it works ok. If I leave it blank and enter the text into the field when the application runs in my emulator it does not work. Any ideas. </p>

<pre><code>package com.example.stringtest;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

import android.view.View;

import android.widget.EditText;
import android.widget.Button;

public class Main extends Activity {

EditText display;
EditText displayTwo;
String displayContents;
Button displayText;

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

    display = (EditText) findViewById(R.id.editText1);
    displayContents = display.getText().toString();

    displayTwo = (EditText) findViewById(R.id.editText2);


    displayText = (Button) findViewById(R.id.button1);

    displayText.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            displayTwo.setText(displayContents);

        }
    });



}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.mainlayout, menu);
    return true;
}
}
</code></pre>
