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,
HashMap详解某东14薪变16薪,是诚意还是套路?浏览器内核(理解)java四大函数式接口(重点,简单)html写樱花树,写樱花树的作文让人意想不到的Python之樱花树(turtle库的华丽样式)os模块的简单使用