-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSplash.java
More file actions
61 lines (37 loc) · 1001 Bytes
/
Splash.java
File metadata and controls
61 lines (37 loc) · 1001 Bytes
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package com.vivek.github;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
public class Splash extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Thread sp = new Thread(){
public void run(){
try {
sleep(3000);
}
catch(Exception e){
e.printStackTrace();
}finally{
Intent i = new Intent(Splash.this , MainActivity.class);
startActivity(i);
}
}
};
sp.start();
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
finish();
}
}