Android 划屏切换调用finish()方法闪屏问题

找了许多资料,偶然发现有种解决方法,就是修改style.xml里的Theme,有些NotitleBar,透明主题直接就能将此问题解决

原理也很简单,如果透明,背景色既为透明色,调用finish()时虽然也会有个窗口往下消失的行为,但是用户是看不到了。

<style name="AppTheme" parent="@android:style/Theme.Translucent.NoTitleBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>


原文地址:https://www.cnblogs.com/vspiders/p/7399120.html