Android7.1系统层实现activity无缝切换切换

如果只是应用层的话参考Android应用层实现Activity无缝切换
该教程针对framework下修改

移除切换动画

./frameworks/base/core/res/res/values/styles.xml
将相关动画修改为@null
<style name="Animation.Activity">
....
<item name="activityOpenEnterAnimation">@null</item>
<item name="activityOpenExitAnimation">@null</item>
<item name="activityCloseEnterAnimation">@null</item>
<item name="activityCloseExitAnimation">@null</item>
<item name="taskOpenEnterAnimation">@null</item>
<item name="taskOpenExitAnimation">@null</item>
<item name="launchTaskBehindTargetAnimation">@null</item>
<item name="launchTaskBehindSourceAnimation">@null</item>
<item name="taskCloseEnterAnimation">@null</item>
<item name="taskCloseExitAnimation">@null</item>
<item name="taskToFrontEnterAnimation">@null</item>
<item name="taskToFrontExitAnimation">@null</item>
<item name="taskToBackEnterAnimation">@null</item>
<item name="taskToBackExitAnimation">@null</item>
....
</style>

发表评论

CAPTCHAis initialing...