title: Layouts in Android [ id or field cannot be resolved]
body: <pre><code>public class Page1 extends Activity {
  
      public void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.welcome);
           final Button button = (Button) findViewById(R.id.welcome);
              button.setOnClickListener(new View.OnClickListener() {
                  public void onClick(View view) {
                      Intent myIntent = null;
                          myIntent = new Intent(view.getContext(), Page1.class);
                      startActivity(myIntent);
                  }
              });          
      }
  
  }
  </code></pre>
  
  <p>I want to load contents from another XML file named welcome.xml, but i do get an error <code>welcome cannot be resolved or is not a field</code> </p>
  
  <p>This Page1.java class is next screen of my Android Application.</p>
  
  <p>My Welcome.xml </p>
  
  <pre><code>&lt;Button android:text="@+id/Button01" android:id="@+id/welcome" 
  android:layout_width="wrap_content" android:layout_height="wrap_content" 
  xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  &lt;/Button&gt;
  </code></pre>