Skip to content

Instantly share code, notes, and snippets.

@mazzouzi
Last active September 24, 2022 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mazzouzi/92bf29cb720b4db833ffdee56b963c74 to your computer and use it in GitHub Desktop.
Save mazzouzi/92bf29cb720b4db833ffdee56b963c74 to your computer and use it in GitHub Desktop.
Header composable
@Composable
private fun Header(scroll: ScrollState, headerHeightPx: Float) {
Box(modifier = Modifier
.fillMaxWidth()
.height(headerHeight)
.graphicsLayer {
alpha = (-1f / headerHeightPx) * scroll.value + 1
}
)
.
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment