-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSplashScreen.java
More file actions
33 lines (25 loc) · 954 Bytes
/
Copy pathSplashScreen.java
File metadata and controls
33 lines (25 loc) · 954 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
package com.example.satyam.myapp;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
public class SplashScreen extends Activity {
//Splash screen timer
private static int splashScreenTimeOut=3000;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
// This method will be executed once the timer is over
// Start your app main activity
Intent intentMain = new Intent(SplashScreen.this, MainActivity.class);
startActivity(intentMain);
// close this activity
finish();
}
}, splashScreenTimeOut);
}
}