Button buttonRed = (Button) findViewById(R.id.buttonRed) ; buttonRed.setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View view) { textView1.setText("Red") ; textView1.setBackgroundColor(Color.rgb(255, 0, 0)); } }) ;