Android basic activity call 2 pages with 1 button respectivly found no erros on validate still won't work in AVD
<p>Can someone tell me whats wrong?? lost</p>

<p>Thanks,Mike</p>

<p>P.S.</p>

<p>I figured this might work instead of the splash for 1st page.</p>

<p>page1 or activity 1</p>

<pre><code>package com.test;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class test1 extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Button next = (Button) findViewById(R.id.Button01);
        next.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
        Intent myIntent = new Intent(view.getContext(),test2.class);
        startActivityForResult(myIntent, 0);

    }
        });
    }
    }
</code></pre>

<p>page2 or activity 2</p>

<pre><code>package com.test;
    import android.app.Activity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.Button;

    public class test2 extends Activity {

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

        Button next = (Button) findViewById(R.id.Button02);
        next.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
        Intent intent = new Intent();
        setResult(RESULT_OK, intent);
        finish();
                   }
               }) ;
        }


}
</code></pre>

<p>Manifiest</p>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.test"
      android:versionCode="1"
      android:versionName="1.0"&gt;
    &lt;uses-sdk android:minSdkVersion="7" /&gt;

    &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
        &lt;activity android:name=".test1"
                  android:label="@string/app_name"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;
                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity android:name=".Activity2"&gt;&lt;/activity&gt;

    &lt;/application&gt;
&lt;/manifest&gt;
</code></pre>
