首先EditText editText = (EditText) findViewById(R.id.xx);然后String text = editText.getText().toString();
button.getText();button为实例名,也许你的but,but1之类的呵呵