时间:2021-07-08 14:49:53 | 栏目:Android代码 | 点击:次
if((getIntent().getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0){
finish();
return;
}
应用程序入口Activity的onCreate方法中加入上面的判断,完美解决应用程序多次重启问题。
应用程序入口Activity的onCreate方法中加入上面的判断,在setcontentview方法之前调用。