标签:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
@Override protected
void
onCreate(Bundle savedInstanceState) { super .onCreate(savedInstanceState); setContentView(R.layout.activity_frist); //1.创建Timer对象 Timer
timer = new
Timer(); //3.创建TimerTask对象 TimerTask
timerTask = new
TimerTask() { @Override public
void
run() { //
TODO Auto-generated method stub Intent
intent = new
Intent(FristActivity. this ,LoginActivity. class ); startActivity(intent); finish(); } }; //2.使用timer.schedule()方法调用timerTask,定时3秒后执行run timer.schedule(timerTask,
3000 ); } |
标签:
原文地址:http://blog.csdn.net/u014311042/article/details/42057971