Button button1 = (Button)findViewById(R.id.button1);
button1.setOnClickListener(this);
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(v.getId() == R.id.button1){
Toast.makeText(context, "Button 1 Click", Toast.LENGTH_LONG).show();
}
}