3秒后跳转到登录界面

来源:互联网 发布:flac转wav软件 mac 编辑:程序博客网 时间:2024/04/25 22:42
方法一:
new Handler().postDelayed(new Runnable() {    public void run() {        Intent intent = new Intent(FirstActivity.this, LoginActivity.class);        startActivity(intent);        finish();    }}, 3000); // 3秒后跳转到登录界面
方法二:
final Intent it = new Intent(this,LoginActivity.class);// 跳转到登录界面Timer timer = new Timer();TimerTask task = new TimerTask() {    @Override    public void run() {        startActivity(it);          // 执行    }};timer.schedule(task,1000*3);
更多文章请点击:
http://blog.csdn.net/u010841622
0 0