/TheElements/src/sand/falling/opengl/Splash.java

http://thelements.googlecode.com/ · Java · 42 lines · 35 code · 6 blank · 1 comment · 0 complexity · 15be4c1998d221f4351c4c1f89c61523 MD5 · raw file

  1. package sand.falling.opengl;
  2. import android.app.Activity;
  3. import android.content.Intent;
  4. import android.os.Bundle;
  5. import android.os.Handler;
  6. public class Splash extends Activity
  7. {
  8. @Override
  9. protected void onCreate (Bundle savedInstanceState)
  10. {
  11. super.onCreate(savedInstanceState); //Call the super method
  12. setContentView(R.layout.splash);
  13. new Handler().postDelayed(
  14. new Runnable()
  15. {
  16. @Override
  17. public void run()
  18. {
  19. //Create an Intent to start DemoActivity
  20. Intent mainIntent = new Intent(Splash.this, MainActivity.class);
  21. Splash.this.startActivity(mainIntent);
  22. Splash.this.finish();
  23. }
  24. }, 5);
  25. }
  26. @Override
  27. protected void onResume()
  28. {
  29. super.onResume();
  30. }
  31. @Override
  32. protected void onPause()
  33. {
  34. super.onPause();
  35. }
  36. }