As you scroll the preview viewpager a lot, the bundle that stores its state for when the view is recreated due to a configuration change increases endlessly. At some point the bundle can become too large and trigger a TransactionTooLargeException.
To avoid this, we can ask the ViewPager2 to not save its state for recreation and instead start over from a blank slate. This apparently doesn't remove any feature in our case and seems to be fixing the issue
As you scroll the preview viewpager a lot, the bundle that stores its state for when the view is recreated due to a configuration change increases endlessly. At some point the bundle can become too large and trigger a TransactionTooLargeException.
To avoid this, we can ask the ViewPager2 to not save its state for recreation and instead start over from a blank slate. This apparently doesn't remove any feature in our case and seems to be fixing the issue