1Button mButton;
2EditText mEdit;
3
4/** Called when the activity is first created. */
5@Override
6public void onCreate(Bundle savedInstanceState)
7{
8 super.onCreate(savedInstanceState);
9 setContentView(R.layout.main);
10
11 mButton = (Button)findViewById(R.id.button);
12 mEdit = (EditText)findViewById(R.id.edittext);
13
14 mButton.setOnClickListener(
15 new View.OnClickListener()
16 {
17 public void onClick(View view)
18 {
19 Log.v("EditText", mEdit.getText().toString());
20 }
21 });
22}