new OnClickListener() {
startButton2.setOnClickListener(new OnClickListener() {
}
}
THAT will never work.
When you declare such a OnClickListener, you declare an anonymous class. That one is defined. If there is no directly accessable method onClick(View v), the action will not happen.
Try this:
startButton1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
}
});
startButton2.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
}
});