android 点击图标,应用重新启动

来源:互联网 发布:客户数据库表格 编辑:程序博客网 时间:2024/05/29 19:40

在启动activity的onCreate方法加入:

     if(!isTaskRoot()){
            finish();
            return;
        }

国外大神:

https://stackoverflow.com/questions/16283079/re-launch-of-activity-on-home-button-but-only-the-first-time/16447508#16447508



阅读全文
0 0
原创粉丝点击