Hi everyone! We have the following code in one of ...
# compose
a
Hi everyone! We have the following code in one of our composables:
Copy code
val appBarContentPadding = WindowInsets
    .statusBars
    .only(WindowInsetsSides.Horizontal + <http://WindowInsetsSides.Top|WindowInsetsSides.Top>)
    .asPaddingValues()

val fullAppBarHeight = remember(appBarContentPadding) {
    appBarHeight + appBarContentPadding.calculateTopPadding()
}
At first, the statusBar Insets have proper values:
InsetsPaddingValues(insets=(statusBars(0, *99*, 0, 0) only WindowInsetsSides(Start+Left+Top+End+Right)), density=DensityImpl(density=3.0, fontScale=1.0))
After a configuration change (such as changing language on the phone and resuming the app) the values are wrong:
InsetsPaddingValues(insets=(statusBars(0, *0*, 0, 0) only WindowInsetsSides(Start+Left+Top+End+Right)), density=DensityImpl(density=3.0, fontScale=1.0))
Could this be a bug or are we doing something wrong?
@harry248 fyi
a
That sounds like a bug, could you create one and provide a sample to reproduce? There’s a similar sounding one here: https://issuetracker.google.com/issues/184380452, so there might be an issue either in androidx.core insets or in Compose’s implementation.
a
@Alex Vanyo Thank you for your reply, where could i post a sample? Here?
a
On a bug in the issue tracker would be great! The link to create a new one for Compose should be in the #compose channel description