-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSplash_Activity.java
44 lines (31 loc) · 1.08 KB
/
Splash_Activity.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
40
41
42
43
44
package com.noori.bbbp;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.WindowManager;
public class Splash_Activity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
Thread timer = new Thread() {
public void run(){
try{
sleep(10000);
}catch (InterruptedException e){
e.printStackTrace();
}finally {
Intent intent = new Intent(Splash_Activity.this, MainActivity.class);
startActivity(intent);
}
}
};
timer.start();
}
@Override
protected void onPause(){
super.onPause();
finish();
}
}