Direct from one activity to another
===

I have a userActivity java class where the user key in his username and then the page will direct to the main menu activity page after clicking the submit button. But when i click the button, it doesnt work. does any anybody know why? below are my codes.


    @Override
    public void onCreate(Bundle savedInstanceState) {
    	super.onCreate(savedInstanceState);
        setContentView(R.layout.user);
        
        Button submitBtn = (Button)findViewById(R.id.btn_submit);
        nameEdit=(EditText)findViewById(R.id.edit_name);
        submitBtn.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(getBaseContext(), SavingsGuiderMenuActivity.class);
				Bundle extras = new Bundle();
				extras.putString("name",nameEdit.getText().toString());
				intent.putExtras(extras);
				startActivity(intent);	
			}
		});
        
    }
    