EDIT: Fixed my main problem. Now I am having problems opening one activity and moving to the next. From my understanding, the manifest tells ".Main" to open which opens the splash.xml file. The sleep command rests on this for 5 seconds than it moves on to the ".menu" and this opens main.xml. However, when I run this app in the emulator only main.xml shows and skips the 5 second intro.
Here are my pages of code:
>**Main.java**
>package com.pooks.thebasics;
>import android.os.Bundle;
>import android.app.Activity;
import android.content.Intent;
>public class Main extends Activity {
>
@Override
protected void onCreate(Bundle TravisIsAwesome) {
super.onCreate(TravisIsAwesome);
setContentView(R.layout.splash);
Thread logoTimer = new Thread(){
public void run(){
try{
sleep(5000);
Intent menuIntent = new Intent("com.pooks.thebasics.MENU");
startActivity(menuIntent);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
>
finally{
finish();
}
}
};
logoTimer.start();
}
}
**splash.xml**
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/splash_back"
android:orientation="vertical" >
</LinearLayout>
>**menu.java**
>
package com.pooks.thebasics;
import android.app.Activity;
import android.os.Bundle;
>
public class menu extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
}
}
>**main.xml**
<LinearLayout 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:layout_gravity="center"
android:background="@drawable/background1"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="54dp"
android:gravity="center"
android:height="25dp"
android:lines="1"
android:paddingBottom="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_vertical_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:text="@string/hello_world"
android:textAppearance="?android:attr/textAppearanceSmallInverse"
android:textStyle="bold"
android:typeface="serif" />
<TextView
android:id="@+id/textView2"
android:layout_width="fill_parent"
android:layout_height="54dp"
android:height="25dp"
android:lines="1"
android:paddingBottom="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_vertical_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:text="I'm pookie jeans"
android:textAppearance="?android:attr/textAppearanceSmallInverse"
android:textStyle="bold"
android:typeface="serif"
android:gravity="center" />
<Button
android:layout_width="224dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="Button 1"
android:textSize="25dp"
android:textStyle="bold" />
</LinearLayout>
>**AndroidManifest.xml**
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pooks.thebasics"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.pooks.thebasics.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="com.pooks.thebasics.menu"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.pooks.thebasics.MENU" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
The code may not be the best code. But it was working at one point. When I put it all together, thats when it started to crash. Again, any help would be appreciated.