android打开代码的软件,android怎么写一个代码可以使得打开一个应用软件时就先出现一个页面然后就跳到软件内容,例如:我…

package com.example.lx56;

import android.app.Activity;

import android.content.Intent;

import android.os.Bundle;

import android.os.Handler;

public class Splash extends Activity {

private final int SPLASH_DISPLAY_LENGHT = 2000; //延迟2秒

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.splash);

new Handler().postDelayed(new Runnable(){//延迟发送runnable对象,封装成message

@Override

public void run() {

Intent mainIntent = new Intent(Splash.this,Login.class);

Splash.this.startActivity(mainIntent);

Splash.this.finish();

}

}, SPLASH_DISPLAY_LENGHT);

}

}

取消

评论

相关资源:斯维尔软件

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2021年4月22日
下一篇 2021年4月22日

相关推荐