Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Android 两个界面间快速切换时,会发现有短暂黑屏
<?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>
<?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>
@beilly

This comment has been minimized.

Copy link
Owner Author

beilly commented Sep 23, 2019

实际是动画使用错误,应该是android:toXDelta="0"

https://www.cnblogs.com/lipeil/p/3424902.html
<item name="android:windowIsTranslucent">true</item>
这种解决方案会导致 onStart回调异常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.