Application not working, beginner
<p>i am fairly new to android programming and usually find my answers to my problems by searching, but this one i just cant and its very confusing.
    The code itself doesn't show any signs of problems, well i do get 2 java exception breakpoints but i dont know how to fix those as they are "unknown"but when i run it on the emulator it says the application has stopped unexpectedly force close. I try to debug it but i dont know how to do it that well. any way here are the codes btw the app is just a test all it to do is have buttons that take me to other "pages" and back.  I would appreciate any help.</p>

<p>Main java file</p>

<pre><code>package com.simbestia.original;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class original extends Activity implements View.OnClickListener {
    Button button1, button2;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        button1 = (Button) findViewById(R.id.pagetwo);
        button2 = (Button) findViewById(R.id.main);

        button1.setOnClickListener(this);
        button2.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
        case R.id.pagetwo:
            setContentView(R.layout.pagetwo);
            break;
        case R.id.main:
            setContentView(R.layout.main);
            break;
        }
    }
}
</code></pre>

<p>Main xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
&gt;
&lt;TextView  
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:text="@string/hello"
/&gt;
&lt;Button android:text="pagetwo" android:id="@+id/pagetwo"              android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/Button&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>Well here is what i change the code to this one is just one button but it works with multiple and i made a class for every page...</p>

<pre><code>package com.simbestia.test;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class main extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    Button mainmenu = (Button) findViewById(R.id.mainmenu);
    mainmenu.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            Intent myIntent = new Intent(view.getContext(),  mainmenu.class);
            startActivityForResult(myIntent, 0);
        }
    });
}
</code></pre>

<p>}</p>

<p>Works how i wanted to so its all good i guess ty again</p>
