1.在一个小应用程序中,退出到主菜单代码
2.在一个小应用程序中,
//退出按钮的事件
private class exit implements OnClickListener{ @Override
public void onClick(View v) {
// TODO Auto-generated method stub
//actibitylife.this.finish();
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
System.exit(0);
}
}
这样的方法调用之后,退出的是桌面,在进行进入这个应用程序时,打开的应用程序界面不是首页
为什么,怎么解决????
求答案…………
2.在一个小应用程序中,
//退出按钮的事件
private class exit implements OnClickListener{ @Override
public void onClick(View v) {
// TODO Auto-generated method stub
//actibitylife.this.finish();
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
System.exit(0);
}
}
这样的方法调用之后,退出的是桌面,在进行进入这个应用程序时,打开的应用程序界面不是首页
为什么,怎么解决????
求答案…………
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货