Posted By

on 04/05/10


Tagged


Versions (?)

Splash Screen (Splash.java)


 / Published in: Java
 

URL: http://www.2030.tk/wiki/Android_Splashscreen

  1. public class Splash extends Activity {
  2. @Override
  3. public void onCreate(Bundle icicle) {
  4. super.onCreate(icicle);
  5. LayoutInflater inflater = getLayoutInflater();
  6. View layout = inflater.inflate(R.layout.splashscreen,
  7. (ViewGroup) findViewById(R.id.splash));
  8. Toast toast = new Toast(getApplicationContext());
  9. toast.setGravity(Gravity.CENTER_VERTICAL, , );
  10. toast.setDuration(Toast.LENGTH_LONG);
  11. toast.setView(layout);
  12. toast.show();
  13.  
  14. new Handler().post(new Runnable() {
  15. @Override
  16. public void run() {
  17. Splash.this.startActivity(new Intent(Splash.this, FrozenBubble.class););
  18. Splash.this.finish();
  19. }
  20. });
  21. }
  22. }

Report this snippet  

You need to login to post a comment.