skydoves / TransformationLayout

🌠 Transform between two Views, Activities, and Fragments, or a View to a Fragment with container transform animations for Android.
Apache License 2.0
2.35k stars 190 forks source link

Animation Glitch when back button is pressed #24

Closed AdamLBS closed 3 years ago

AdamLBS commented 3 years ago

Please complete the following information:

Describe the Bug:

I have a button which start an activity, when I click on it the transition is smooth and works perfectly but when I press the back Button, the animation is glitching for a fraction of a second.

Video

skydoves commented 3 years ago

Hi, thank you for your issue about this! This is the known issue by the Material-components since 1.3.0-alpha01, I'm also waiting for the issue will be resolved by the material team. Thanks :)

AdamLBS commented 3 years ago

Hi, thank you for your issue about this! This is the known issue by the Material-components since 1.3.0-alpha01, I'm also waiting for the issue will be resolved by the material team. Thanks :) Thank you for your response.

Is there any workaround in the meantime ? I've tried lowering the Material dependency to 1.2.0-alpha06 and the library to 1.0.4 But i'm getting this error when pressing a button

Thanks :)

>    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/material/transition/MaterialContainerTransformSharedElementCallback;
>         at com.skydoves.transformationlayout.TransitionExtensionKt.onTransformationEndContainer(TransitionExtension.kt:43)
>         at com.adamlbs.marouviere.NewsActivity.onCreate(NewsActivity.java:44)
>         at android.app.Activity.performCreate(Activity.java:7887)
>         at android.app.Activity.performCreate(Activity.java:7871)
>         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1328)
>         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3487)
>         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3671)
>         at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:99)
>         at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
>         at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
>         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2127)
>         at android.os.Handler.dispatchMessage(Handler.java:106)
>         at android.os.Looper.loopOnce(Looper.java:201)
>         at android.os.Looper.loop(Looper.java:288)
>         at android.app.ActivityThread.main(ActivityThread.java:7729)
>         at java.lang.reflect.Method.invoke(Native Method)
>         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
>         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:974)
>      Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.material.transition.MaterialContainerTransformSharedElementCallback" on path: DexPathList[[zip file "/data/app/~~5lMXuO15vX_iSTI-2fjg4A==/com.adamlbs.marouviere-JTMJM0fDEe4kcJkfl7XqyA==/base.apk"],nativeLibraryDirectories=[/data/app/~~5lMXuO15vX_iSTI-2fjg4A==/com.adamlbs.marouviere-JTMJM0fDEe4kcJkfl7XqyA==/lib/x86_64, /system/lib64, /system_ext/lib64]]
>         at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
> 
skydoves commented 3 years ago

Hmm.. I think one of your internal libraries uses over the 1.2.0-alpha06 version. Because the class Lcom/google/android/material/transition/MaterialContainerTransformSharedElementCallback was migrate into androidx transition package in the 1.3.0-alpha01 verssion.