# compose

Andy Himberger

05/13/2022, 4:31 PM
Migrating WindowInsets from accompanist to compose foundation, It seems we now have to conditionally apply WindowInsets modifiers depending on if the activity is in edge to edge mode ? Should this be mentioned in the migration guide? With accompanist, I could always have the inset applying padding/modifiers in my topappbar/etc. The inset sizes would be all 0 if the activity had not used the WindowCompat.setDecorFitsSystemWindows API. But with foundation, I'm seeing that windowInsets.statusBars, navigationbars, etc always have size so in our activities that are not yet migrated (or where we don't enable it because OS behavior is semi broken on android10), we're getting ugly extra padding.


05/13/2022, 4:38 PM
This is likely because the new version seeds the initial values from the root window insets. Definitely worth raising an issue

Andy Himberger

05/13/2022, 6:33 PM btw I haven't figured out how to detect I'm in edge to edge mode, if someone knows what API works to query