android启动activity时防止变暗

当我在 Android 应用程序中切换活动时,渲染时屏幕会快速变暗(半秒)。

例如,如果我按下启动活动的按钮,屏幕会快速变暗。

无论如何我可以阻止这个吗???


温温酱
浏览 41回答 1
1回答

GCT1015

也许如果你尝试关闭动画你会得到你需要的东西&nbsp; &nbsp; &nbsp; &nbsp; overridePendingTransition(R.anim.stay, R.anim.stay)//then start the new activityR.anim.stay:&nbsp; &nbsp; <?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android">&nbsp; &nbsp; <translate android:duration="@android:integer/config_mediumAnimTime"/></set>
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java