码迷,mamicode.com
首页 > 其他好文 > 详细

Test for Activity to display Deslayed

时间:2016-03-31 14:42:15      阅读:106      评论:0      收藏:0      [点我收藏+]

标签:

用线程 public class Test extends Activity {
private final int SPLASH_DISPLAY_LENGHT = 10000; // 延迟10秒

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
new Handler().postDelayed(new Runnable() {

@Override
public void run() {
Intent intent = new Intent(Test.this,
Your.class);
startActivity(intent);
Test.this.finish();
finish();
}

}, SPLASH_DISPLAY_LENGHT);
}

Test for Activity to display Deslayed

标签:

原文地址:http://www.cnblogs.com/gentspy/p/5340830.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!