Fragment Transition Animation Causes Glitch on Android 14 When Using ViewPager2
I've been working with an scenario where my fragment transition animations are glitching when navigating between fragments in a `ViewPager2`... Specifically, when using a combination of `FragmentStateAdapter` and a `PageTransformer`, the transition seems to stutter and occasionally skip the animation altogether, especially on devices running Android 14. Here's a simplified version of my adapter implementation: ```kotlin class MyPagerAdapter(fragmentActivity: FragmentActivity) : FragmentStateAdapter(fragmentActivity) { override fun getItemCount(): Int = 5 override fun createFragment(position: Int): Fragment { return MyFragment.newInstance(position) } } ``` I've set up a basic `ViewPager2` in my activity and applied the following PageTransformer: ```kotlin viewPager.setPageTransformer { page, position -> page.alpha = 1 - abs(position) page.translationX = -position * page.width } ``` Despite the simple setup, I consistently see a stutter effect when swiping between pages. I’ve tried adjusting the animation duration using `ViewPager2.setPageTransformer()` with different interpolators but the scenario continues. I also checked the logs and didn’t find any behavior messages, but I did notice a warning about the `ViewPager2` trying to re-inflate views which might be related: `Warning: Attempt to invoke virtual method 'void android.view.ViewGroup.setLayoutTransition(android.transition.LayoutTransition)' on a null object reference`. Has anyone else experienced this glitch with fragment transitions in `ViewPager2` on Android 14? Any insights or suggestions on how to resolve this? I want to ensure smooth animations without any stuttering or skipping. The stack includes Kotlin and several other technologies. Is this even possible?