title: In Android :: When setContentView() is replaced with new layout while in runtime which method is called
body: <p>Hi I am new to android programming.
  Here my problem is... 
  I designed 2 layouts.</p>
  
  <p>1) <strong>R.layout.main</strong>: it consists one TextField,one EditText and one Button</p>
  
  <p>2) <strong>R.layout.window</strong>: it holds 5 buttons</p>
  
  <p>here at first,R.layout.main is displayed.By default R.layout.main is calling so when i press the button of that main layout it needs to forward to r.layout.window.
  Forwarding process is ok.. </p>
  
  <p>BUT WHEN I MAKE CALL LIKE 
  <code>BUTTON button=(Button)findViewById(R.id.b1);// b1 is at R.layout.window</code></p>
  
  <p>i am getting an exception.. SO CAN I KNOW WHICH METHOD WILL BE CALLED WHEN setContentView() IS CALLED and FROM ONCREATE(),IS IT POSSIBLE TO CALL MULTIPLE LAYOUTS R.id.namess..</p>
  
  <p>waiting for reply</p>