application crashed due to regex function . which stops intent to switch from one to another activity [duplicate]

Please keep the below code out side of your onCreate() method

btSignup.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        Intent up = new Intent(MainActivity.this,Registration.class);
        startActivity(up);
    }
});

Leave a Comment