Skip to content

Instantly share code, notes, and snippets.

@egorikftp
Created August 8, 2021 20:21
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 egorikftp/e3169318e9cb0b705b1b556b257ef6da to your computer and use it in GitHub Desktop.
Save egorikftp/e3169318e9cb0b705b1b556b257ef6da to your computer and use it in GitHub Desktop.
@Composable
fun SheetCollapsed(
currentFraction: Float,
content: @Composable RowScope.() -> Unit
) {
Row(
modifier = Modifier
.fillMaxWidth()
.height(72.dp)
.background(MaterialTheme.colors.primary)
.graphicsLayer(alpha = 1f - currentFraction),
verticalAlignment = Alignment.CenterVertically
) {
content()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment