moviemastersdk
Newbie
I'm going to split this up into small pieces
(BTW, this is just a test app, because i wan't to know how to do stuff before making apps
My main.xml looks like this
And the main.java i created for that looks like this
i've created 2 different activities, and an xml file for both of them,
but whenever i press the button, i get a force close message,
can anyone tell what i did wrong, and how to fix it.
here is my manifest
(BTW, this is just a test app, because i wan't to know how to do stuff before making apps

My main.xml looks like this
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical" >
<Button
android:id="@+id/nextpage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Go to next Page" />
</LinearLayout>
And the main.java i created for that looks like this
Code:
package com.danielholst.testing;
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 nextpage = (Button) findViewById(R.id.nextpage);
nextpage.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent aboutpage = new Intent("com.danielholst.testing.PAGETWO");
startActivity(aboutpage);
}
});
}
}
i've created 2 different activities, and an xml file for both of them,
but whenever i press the button, i get a force close message,
can anyone tell what i did wrong, and how to fix it.
here is my manifest
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.danielholst.testing"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="7" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".Main"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".page2"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.PAGETWO" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
