Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[Jetsurvey] Using onSizeChanged to set the branding height
  • Loading branch information
florina-muntenescu committed Oct 13, 2020
commit 1a0e2cdf6049978d30b63d0e257e5ecc0e5ac79f
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.boundsInParent
import androidx.compose.ui.onGloballyPositioned
import androidx.compose.ui.onSizeChanged
import androidx.compose.ui.platform.DensityAmbient
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
Expand Down Expand Up @@ -72,9 +73,9 @@ fun WelcomeScreen(onEvent: (WelcomeEvent) -> Unit) {
modifier = Modifier.fillMaxWidth()
.brandingPreferredHeight(showBranding, heightDp)
.offsetPx(y = currentOffsetHolder)
.onGloballyPositioned {
.onSizeChanged {
if (showBranding) {
heightWithBranding = it.size.height
heightWithBranding = it.height
}
}
) {
Expand Down