Created
February 23, 2012 02:05
-
-
Save joshdholtz/1889198 to your computer and use it in GitHub Desktop.
Android Splash Screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Timer; | |
import java.util.TimerTask; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.util.DisplayMetrics; | |
import android.util.Log; | |
import android.widget.Toast; | |
public class SplashActivity extends Activity{ | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_splash); | |
Timer timer = new Timer(); | |
timer.schedule(splashTimerTask, 5000); | |
} | |
private TimerTask splashTimerTask = new TimerTask() { | |
@Override | |
public void run() { | |
startActivity(new Intent(SplashActivity.this, GreatLakesContactsActivity.class)); | |
finish(); | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment