Click on button not taking to next Activity in android
- by user1805266
When i click on GO button its not taking to next Activity. I am using the following code.. can any one correct me where am i going wrong?
final Button button = (Button) findViewById(R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// Perform action on click
startActivity(new Intent(currentActivity.this, NextActivity.class));
}
});