Last active
September 24, 2022 11:30
-
-
Save mazzouzi/92bf29cb720b4db833ffdee56b963c74 to your computer and use it in GitHub Desktop.
Header composable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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