WindowInsetsApplier
An OnApplyWindowInsetsListener that applies WindowInsets to all children of a ViewPager2, making sure they all receive the same insets regardless of whether any of them consumed any insets.
To prevent the ViewPager2 itself from dispatching the insets incorrectly, this listener will consume all insets it applies. As a consequence, siblings of ViewPager2, or siblings of its parents, to whom the WindowInsets haven't yet been dispatched, won't receive them at all. If you require those views to receive the WindowInsets, do not set this listener on ViewPager2 and do not consume insets in any of the pages.
Call install to install this listener in ViewPager2.
When running on API 30 or higher and the targetSdkVersion is set to API 30 or higher, the fix is not needed and install will do nothing. None of the above described effects will happen.