1
votes

I have a splash screen (I was required to use it) that is supposed to show for 3 second prior to the start of my game, unfortunately the game screen will not progress once the splash has started. I thought my code was implemented correctly, but I appear to have erred somewhere. Any help is appreciated.

public class SplashScreen extends AppCompatActivity{

    // Splash Screen Timer
    private static int SPLASH_TIME_OUT = 3000;

    //@Override
    public void OnCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);

        new Handler().postDelayed (new Runnable() {
            @Override
            public void run() {
                Intent i = new Intent (SplashScreen.this, Snake.class);
                startActivity(i);

                finish ();
            }
        }, SPLASH_TIME_OUT);
    }
}

I know many are opposed to adding splash screens due to the fact is makes many users feel like there is a delay to the program, but again, this was not my decision, thus why I wanted to hard code is to a mere 3 seconds.

1

1 Answers

5
votes

It's because the misspelling use onCreate instead of OnCreate. The way you are using onCreate method is never executed.