微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Android共享元素过渡闪烁问题

如何解决Android共享元素过渡闪烁问题

这里我在 activity_credential.xml 中有一个ImageView,我尝试将其发送到另一个Activity activity_signup.xml 中,现在的问题是当我尝试将其发送到ActivitySignup,一切都会变得流畅,但是当我按下后退按钮时,它会闪烁,我正在附上屏幕录像或它!

以下是屏幕录像:https://drive.google.com/file/d/1xCBHY4R29GXC2d8ksWrkr6p-pwUVio_u/view

这是activity_credential.xml

<ImageView
    android:id="@+id/IMG_APP_BANNER"
    android:src="@drawable/logo_high"
    android:layout_width="256dp"
    android:transitionName="APPBANNER"
    android:layout_height="wrap_content"/>

这是我切换到ActivitySignup.xml

的方式
    ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(ActivityCredentials.this,getImgAppBanner(),"APPBANNER");
            startActivity(new Intent(ActivityCredentials.this,ActivitySignup.class),options.toBundle());

这是activity_signup.xml

<ImageView
    android:layout_gravity="right"
    android:id="@+id/IMG_APP_BANNER"
    android:src="@drawable/logo_high"
    android:layout_width="256dp"
    android:transitionName="APPBANNER"
    android:layout_height="wrap_content"/>

这是我的style.xml

 <style name="BaseAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="android:windowBackground">@color/materialWhite</item>     
    <item name="android:windowActivityTransitions">true</item>

</style>

任何人都可以建议,什么是错误

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。