Android 如何将documentLaunchMode设置为;“粘在一起”;(就像Chrome做的那样)在概述中?
我注意到,当我从Chrome打开一个新标签(“合并标签和应用程序”启用)时,来自同一域的新标签将在概览中粘在一起 代码是这样的Android 如何将documentLaunchMode设置为;“粘在一起”;(就像Chrome做的那样)在概述中?,android,google-chrome,android-5.0-lollipop,Android,Google Chrome,Android 5.0 Lollipop,我注意到,当我从Chrome打开一个新标签(“合并标签和应用程序”启用)时,来自同一域的新标签将在概览中粘在一起 代码是这样的 Intent i = new Intent(this, SomeActivity.class) .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(i); 或者在AndroidManifest.xml中设置android:documentLaunchMode=“always”可以打开多
Intent i = new Intent(this, SomeActivity.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
或者在
AndroidManifest.xml
中设置android:documentLaunchMode=“always”可以打开多张卡,但不能在概览中“粘在一起”(就像Chrome那样) 7个月后,我的朋友@mthli终于找到了解决方案:
startActivity(newDocumentIntent,
ActivityOptions.makeTaskLaunchBehind().toBundle());
原始链接(中文):