Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SplashActivity extends SherlockActivity {
- private long splashDelay = 3000;
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.splash_screen);
- TimerTask task = new TimerTask() {
- @Override
- public void run() {
- Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);
- startActivity(mainIntent);
- finish();
- }
- };
- Timer timer = new Timer();
- timer.schedule(task, splashDelay);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment