EDIT: Just saw that while I was writing you got the answer in a comment section after provided your error message. Anyway, my advice below still stands. Good luck and enjoy your coding!
2nd EDIT: Can you please provide your styles.xml where your base app theme is. What is your parent Theme? You don't want ActionBar then in your base theme in styles.xml write next two lines:
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
So your base theme style should look like this:
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
Or you can simply extend your base theme as NoActionBar Theme and probably solve this issue.
<style name="NoActionBarTheme" parent="Theme.AppCompat.Light.NoActionBar">
...
</style>
Welcome to Stackoverflow. I'll be glad to help you but can you please provide us your crash error and your whole RegisterActivity.class, just like you did with MenuActivity.class. There could be many errors and solutions to this but it's hard to answer at first sight.
Also, I would suggest two things before even seeing the rest of the code.
1. Delay startActivity() with timelength of toast message
This will show a toast message to your user that "User is created" and then proceed to MenuActivity.class. This is good practice because your Toast won't cause any problems or won't be shown once you are already on MenuActivity.
To do this just use this:
Handler mHandler = new Handler();
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(RegisterActivity.this, MenuActivity.class);
startActivity(intent);
finish();
}
}, 2000);
//Toast.LENGTH_SHORT = 2000 milisec = 2 seconds
//Toast.LENGHT_LONG = 3500 milisec = 3.5 seconds
2. Show your message in MenuAcitivty.class
If you don't want to delay your startAcitivty() you can simply show your message once a user is on MenuActivity after the registration process is over. To do this you can use intent.putExtra to provide info that the user is coming from RegisterActivity.class.
Intent intent = new Intent(RegisterActivity.this, MenuActivity.class);
intent.putExtra("NEW_USER", true);
startActivity(intent);
finish();
Then in MenuActivity.class in OnCreate just write this.
if (getIntent().hasExtra("NEW_USER") && getIntent().getBooleanExtra("NEW_USER", false)) {
Toast.makeText(getBaseContext(), "User created succesfully", Toast.LENGTH_SHORT).show();
}