Back to project page Pick-n-Eat-Android.
The source code is released under:
MIT License
If you think the Android project Pick-n-Eat-Android 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.nicolasdu.pick_n_eat; /*from w w w. jav a2 s . c o m*/ import android.content.Intent; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.Window; import android.view.WindowManager; import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN; public class SplashActivity extends ActionBarActivity { private static String TAG = SplashActivity.class.getName(); private static long SLEEP_TIME = 5; // temps d'attente du splash screen en secondes @Override protected void onCreate(Bundle savedInstanceState) { //this.requestWindowFeature(Window.FEATURE_NO_TITLE); super.onCreate(savedInstanceState); this.supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.activity_splash); IntentLauncher launcher = new IntentLauncher(); launcher.start(); } private class IntentLauncher extends Thread { public void run() { try { //Sleeping ... Thread.sleep(SLEEP_TIME*1000); } catch (Exception e) { Log.e(TAG, e.getMessage()); } //start main activity Intent intent = new Intent(SplashActivity.this, MainActivity.class); SplashActivity.this.startActivity(intent); SplashActivity.this.finish(); } } @Override protected void onDestroy() { super.onDestroy(); } }