var account = 0;
//实现按两次back键退出程序
Emp.page.addEvent("onPressBackKeySystem",function(){
account++;
toast("再按一次后退键退出程序");
if(account>1){
System.exit();
}
setTimeout(2000,function(){
if(account>1){
System.exit();
}else{
account=0;
}
})
});
安卓端如何监听系统返回键按钮
最新推荐文章于 2025-05-14 13:53:08 发布