Created
September 23, 2019 06:37
-
-
Save beilly/72296551eda7bd2702c2e54b23205d5c to your computer and use it in GitHub Desktop.
Android 两个界面间快速切换时,会发现有短暂黑屏
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android"> | |
<translate | |
android:duration="@integer/slide_animation_duration" | |
android:fromXDelta="-100%p" | |
android:interpolator="@android:anim/accelerate_decelerate_interpolator" | |
android:toXDelta="0"/> | |
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android"> | |
<translate | |
android:duration="@integer/slide_animation_duration" | |
android:fromXDelta="-100%p" | |
android:interpolator="@android:anim/accelerate_decelerate_interpolator" | |
android:toXDelta="100%p"/> | |
</set> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
实际是动画使用错误,应该是
android:toXDelta="0"
https://www.cnblogs.com/lipeil/p/3424902.html
<item name="android:windowIsTranslucent">true</item>
这种解决方案会导致 onStart回调异常