Back to project page andBlock.
The source code is released under:
MIT License
If you think the Android project andBlock listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.sakirtemel.andblock; /*from w w w . j a v a2 s.c om*/ import android.os.Bundle; import android.os.Handler; import android.app.Activity; import android.content.Intent; import android.view.Menu; public class Splash extends Activity { private static int SPLASH_TIME_OUT = 2000; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_splash); new Handler().postDelayed(new Runnable() { /* * Showing splash screen with a timer. This will be useful when you * want to show case your app logo / company */ @Override public void run() { // This method will be executed once the timer is over // Start your app main activity Intent i = new Intent(Splash.this, MainActivity.class); startActivity(i); // close this activity finish(); } }, SPLASH_TIME_OUT); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.splash, menu); return true; } }