首页 > 代码库 > handler设置消息延迟操作

handler设置消息延迟操作

Handler mHandler;

mHandler=new Handler(){
public void dispatchMessage(android.os.Message msg) {
switch (msg.what) {
case 1:
Intent mIntent=new Intent();
mIntent.setClass(SetPassActivity.this, MainActivity.class);
startActivity(mIntent);
break;

default:
break;
}
};
};
mHandler.sendEmptyMessageDelayed(1, 2000);