How to Handle Two Activities with Two layouts in android
===

I have and Android Application in which two I have tow Activities One Is `GmapsActivity` and other is `GmapsActivity1`  and two layouts One is `login.xml` and other is `main.xml` By default i want to load `login.xml` and then in this i call `main.xml` on different conditions of password.But When I call `GmapsActivity1` application crashed.  Here is My code Sample for `GmapsActivity`



    public class GMapsActivity extends MapActivity {
    
    EditText password;
    Button   login;
    
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.login);
    
            password=(EditText)findViewById(R.id.pass);
            login=(Button)findViewById(R.id.logbtn);
    
            login.setOnClickListener(new View.OnClickListener(){
                public void onClick(View v)
                {
                	Intent myIntent = null;
                	if(password.getText().toString().equals("admin")) {
                	myIntent = new Intent(getApplicationContext(), GMapsActivity.class);
                	startActivity(myIntent);
                	} else {
                	Toast.makeText(getBaseContext(), "invalid password - try again",  Toast.LENGTH_SHORT).show();
                	}
    
                }
    
            });
    
        }
    
    
    
        @Override
        protected boolean isRouteDisplayed() {
           
            return false;
        }
    
    
        }

Please Any One Help Me to getout of this problem
