Open recodyx opened 1 year ago
I agree. The last I checked ViewPager2
does not support instantiateItem()
. I have places in my codebase where I have opted to keep ViewPager
b/c of issues like this. For example, you will need instantiateItem()
in your fragment's onMapSharedElements()
if you are going to set a transition animation into an element that is in a ViewPager
. You can't do this w/ ViewPager2
.
I agree 100%. I couldn't stop getting: java.lang.IllegalStateException: Page(s) contain a ViewGroup with a LayoutTransition (or animateLayoutChanges="true"), which interferes with the scrolling animation No matter what I updated, it would constantly crash. Even setting setAnimateParentHierarchy(false) on any ViewGroup proved useless. I don't know how they could deprecate ViewPager for something so buggy.
ViewPager2 is definitely not an improvement over ViewPager from my point of view.
Sorry I'm migrating from ViewPager right now and it's terrible.
Overall our code has become much more complex and less readable. Too bad.