Java:
package com.example.test1;
import android.app.Activity;
import android.os.Bundle;
public class Splash extends Activity {
@Override
protected void onCreate(Bundle TravisLoveBacon) {
// TODO Auto-generated method stub
super.onCreate(TravisLoveBacon);
setContentView(R.layout.splash);}
Thread timer = new Thread(){
public void run(){
try{
sleep(5000);
} catch (InterruptedException e){
e.printStackTrace();
}finally{
Intent openStartingPoint = new intent ("com.example.test1.MainActivity");
startActivity(openStartingPoint);
}
}
}
;
timer.start();
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:orientation="vertical"
android:background="@drawable/splash_background">
</LinearLayout>
Edit: Terribly sorry! Was posting in a haste and completely forgot to list the errors.
timer.start(); - Syntax error, insert "}" to complete ClassBody - Syntax error on token "start", Identifier expected after this token
I've been staring at my code for an hour and can't find the issue. I just know the bug is some stupid syntax error thats staring right back at me.
Any help appreciated!