Android app进入前的闪屏界面代码

package com.zhoujn.lostfound;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;

/** 闪屏页
* @ClassName: SplashActivity
* @Description: TODO
* @author smile
* @date 2014-5-21 下午2:21:28
*/
@SuppressLint(“HandlerLeak”)
public class SplashActivity extends BaseActivity {
@Override public void setContentView() { // TODO Auto-generated method stub
setContentView(R.layout.activity_splash); } @Override public void initViews() {
// TODO Auto-generated method stub } @Override public void initListeners() { //
TODO Auto-generated method stub } @Override public void initData() { // TODO
Auto-generated method stub mHandler.sendEmptyMessageDelayed(GO_HOME, 3000); }
public void goHome() { Intent intent = new Intent(this, MainActivity.class);
startActivity(intent); this.finish(); } private static final int GO_HOME = 100;
private Handler mHandler = new Handler() { @Override public void
handleMessage(Message msg) { switch (msg.what) { case GO_HOME: goHome(); break;
} } };
}

技术
©2019-2020 Toolsou All rights reserved,
Linux 文件名合法性检测mybatis系列之返回结果映射【Python】读取txt文件,获取指定行中指定位置数据unity 获取小车速度及前进或者后退使用VS2019 “Windows桌面应用程序”模块创建Win32窗口java几种常见运行时异常及简单例子Three.js - OrbitControls 轨道控件的围绕目标 target 参数pytorch之ResNet18(对cifar10数据进行分类准确度达到94%)rk3399_android7.1调试USB蓝牙模块小结11-5 指定位置输出字符串