1Button button = (Button) findViewById(R.id.button_send);
2button.setOnClickListener(new View.OnClickListener() {
3 public void onClick(View v) {
4 // Do something in response to button click
5 }
6});
7//https://developer.android.com/guide/topics/ui/controls/button