title: the codes are not working in the second xml file
body: <p>i am just working on a test app.</p>
  
  <p>this is the xml file of the home page.</p>
  
  <pre><code>      &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context=".MainActivityTEST2" &gt;
  
      &lt;TextView
          android:id="@+id/textView1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/hello_world" /&gt;
  
      &lt;Button
          android:id="@+id/button12"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/textView1"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="72dp"
          android:text="Button12" /&gt;
  
         &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>i have added a button listener to go to other page. here is my code for that.</p>
  
  <pre><code> package com.example.test2;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.view.Menu;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  
  public class MainActivityTEST2 extends Activity {
  
      Button but;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main_activity_test2);
      but=(Button)findViewById(R.id.button12);
      but.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View arg0) {
              // TODO Auto-generated method stub
              setContentView(R.layout.activity123);
          }
      });
  
      }
  
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main_activity_test2, menu);
          return true;
      }
  </code></pre>
  
  <p>when i add a button listener in the second page to display text in the textfield, nothing works.</p>
  
  <p>xml file of the second page</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;Button
          android:id="@+id/button2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Button" /&gt;
  
      &lt;EditText
          android:id="@+id/edittext1"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:ems="10" &gt;
  
          &lt;requestFocus /&gt;
      &lt;/EditText&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>when i add a button listerner to display text in the textfiled, nothing works.
  the app neighter stops working nor does anything after that.</p>
  
  <p>my second window's java content is</p>
  
  <pre><code>import android.app.Activity;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  
  import com.example.test2.R;
  
  
  
  public class activity_main_activty_test2 extends Activity {
      Button but2;
      EditText edit1;
  
       @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity123);
  
              edit1=(EditText)findViewById(R.id.edittext1);
              but2=(Button)findViewById(R.id.button2);
              but2.setOnClickListener(new View.OnClickListener() {
  
                  @Override
                  public void onClick(View v) {
                      // TODO Auto-generated method stub
                      edit1.setText("hellow");
                  }
              });
  
            }
  
  
  
       @Override
          public boolean onCreateOptionsMenu(Menu menu) {
              // Inflate the menu; this adds items to the action bar if it is present.
              getMenuInflater().inflate(R.menu.main_activity_test2, menu);
              return true;
          }
  }
  </code></pre>
  
  <p>am i missing something. do i have to address something. please help i am just a biggener.</p>