You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
MiNote/src/main/java/net/micode/notes/ui/SplashActivity.java

49 lines
1.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package net.micode.notes.ui;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.os.Handler;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.os.Handler;
import net.micode .notes.R;
import net.micode.notes.databinding.ActivitySplashBinding;
import net.micode.notes.R;
/**
* @projectName项目名称: xiaomi label
* @package: ui
* @className类名称: type_name
* @description类描述: 欢迎界面
* @author创建人: zhangchaoqun
* @createDate创建时间: datetime
* @updateUser修改人: user
* @updateDate修改时间: datetime
* @updateRemark修改备注: 说明本次修改内容
* @version版本: v1.0
*/
public class SplashActivity extends AppCompatActivity {
Handler mHandler=new Handler();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); //加载启动界面
setContentView(R.layout.activity_splash); //加载启动图片
// 当计时结束时跳转至NotesListActivity
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
Intent intent=new Intent();
intent.setClass(SplashActivity.this, NotesListActivity.class);
startActivity(intent);
finish(); //销毁欢迎页面
}
}, 1000); // 1秒后跳转
}
}