install

open fun install(@NonNull viewPager: ViewPager2): Boolean(source)

Installs a WindowInsetsApplier into the given ViewPager2, but only when window insets dispatching hasn't been fixed in the current run configuration. It will return whether or not the WindowInsetsApplier was installed.

Window insets dispatching is fixed on Android SDK R, but the targetSdk of the app also needs to be set to R or higher. If both these conditions hold, the WindowInsetsApplier won't be installed. If either we're running on SDK

Return

Whether or not the WindowInsetsApplier was installed

Parameters

viewPager

The ViewPager2 to install the WindowInsetsApplier into