I learn from
http://developer.android.com/reference/android/widget/Button.html
that \"instead of applying an OnClickListener to the button
public class start extends Activity implements View.OnClickListener { Button bSMS;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_start);
bSMS = (Button) findViewById(R.id.button);
bSMS.setOnClickListener(this);
}
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
switch (arg0.getId()) {
case R.id.button: //"Block SMSs" button pressed
startActivity(new Intent(this,secret_main.class));
break;
}
}
}