-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathHomeActivity.java
43 lines (32 loc) · 1.23 KB
/
HomeActivity.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
package com.example.shwetapathak.ambulanceservicesfinal;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import static java.lang.Thread.sleep;
public class HomeActivity extends AppCompatActivity {
ImageView splashImage;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
splashImage = (ImageView) findViewById(R.id.imagesplash);
Animation myanim = AnimationUtils.loadAnimation(this,R.anim.myanimation);
splashImage.startAnimation(myanim);
Thread myThread = new Thread(new Runnable() {
@Override
public void run() {
try {
sleep(3000);
Intent i = new Intent(HomeActivity.this,MainActivity.class);
startActivity(i);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
});
myThread.start();
}
}