-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSplash.java
59 lines (52 loc) · 1.43 KB
/
Splash.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package com.example.tasbeeh;
import android.app.Activity;
import android.content.ActivityNotFoundException;
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
super.onCreate(savedInstanceState);
//fullscreen
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
//
setContentView(R.layout.splash);
Thread timer=new Thread(){
public void run()
{
try
{
sleep(3000);
}//try
catch(InterruptedException e)
{
e.printStackTrace();
}//catch
/*catch(ActivityNotFoundException ea)
{
ea.printStackTrace();
}*/
/*catch(Exception ex)
{
ex.printStackTrace();
}*/
finally
{
Intent MainAct = new Intent("com.example.tasbeeh.MAINACTIVITY");
startActivity(MainAct);
}//finally
}//run
};//thread
timer.start();
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
finish();
}
}