-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSplashScreen.java
39 lines (34 loc) · 1009 Bytes
/
SplashScreen.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.example.itcapstone.burglarkitten;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
/**
* Created by Mo on 7/18/2016.
*/
public class SplashScreen extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Thread timerThread = new Thread(){
public void run(){
try{
sleep(3000);
}catch(InterruptedException e){
e.printStackTrace();
}finally{
Intent intent = new Intent(SplashScreen.this,MainActivity.class);
startActivity(intent);
}
}
};
timerThread.start();
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
finish();
}
}