public class MainActivity extends Activity {
private TextView nameTextView;
private EditText xingEditText;
private (1)
mingEditText
;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.
activity_main
);
xingEditText=(2)
( R.id.
xingEditText
);
mingEditText=(EditText)findViewById(R.id.
mingEditText
);
nameTextView=(TextView)findViewById(R.id.
nameTextView
);
nameTextView.setOnClickListener((3)
{
@Override
public void (4)
(View v){
String xing,ming;
xing=xingEditText.getText().toString();
ming=mingEditText.getText().toString();
nameTextView.(5)
(xing+” “+ming);
}
});
}
}