public class MainActivity extends Activity {
private Button button;
private EditText text;
private TextView view;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_main);
button=(Button) findViewById(R.id.button);
text=(EditText) findViewById(R.id.text);
view=(TextView) findViewById(R.id.view);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
view.setText(text.getText().toString()+text.getText().toString());
}
});
}
}