我正在创建一个我想永远不会使用Window动画的应用程序..我尝试过使用
intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
在调用新意图的方法中..
我也尝试将它放在我的清单的意图过滤器中,如下所示:
<data android:name="android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION" />
无论哪种方式似乎只处理窗口动画的一面,这意味着它似乎仍在动画中,意图,只是没有出来..
必须有一种简单的方法来禁用应用中的所有窗口动画..
答案 0 :(得分:0)
FLAG_ACTIVITY_NO_ANIMATION
取消下一个开始动画的活动,但不取消当前活动结束动画:试试这个:
startActivity(...); // with your intent containing the flag
finish(); // not sure if this is necessary
overridePendingTransition(0, 0); // this cancels the ending animation