Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Component used: Activity
Version used:
1.9.3
Devices/Android versions reproduced on: Android 5.0 Lollipop
I have an Activity that holds four Fragments via
ViewPager2
andFragmentStateAdapter
. I noticed thatViewCompat.setOnApplyWindowInsetsListener
and itsOnApplyWindowInsetsListener
callback only fires one time at the first tab Fragment in Android 5 or probably all version prior to Android 15.Activity -
OnApplyWindowInsetsListener
gets calledOverviewFragment -
OnApplyWindowInsetsListener
gets calledProfileFragment -
OnApplyWindowInsetsListener
gets called for Android 15 but not on Android 5ExchangeFragment -
OnApplyWindowInsetsListener
gets called for Android 15 but not on Android 5MetricsFragment -
OnApplyWindowInsetsListener
gets called for Android 15 but not on Android 5Also worth mentioning that when using other Android's tab solution such as Material Design Component
BottomNavigationView
with Jetpack Navigation, returningWindowInsetsCompat.CONSUMED
on each Fragments does not end the passing of window insets regardless of Android version I am running. So I don't know if this is a bug for backward compatibility of edge-to-edge enforcement, it seems thatViewPager
Fragments view hierarchy are treated as one in older devices?