Skip to content

Instantly share code, notes, and snippets.

@shoaibmushtaq25
Created December 4, 2024 08:07
Show Gist options
  • Save shoaibmushtaq25/2ce1ca32fc7749fcd3c24f600fe06dd5 to your computer and use it in GitHub Desktop.
Save shoaibmushtaq25/2ce1ca32fc7749fcd3c24f600fe06dd5 to your computer and use it in GitHub Desktop.
...
@Composable
fun NavBar() {
var alphaValue by remember { mutableFloatStateOf(0f) }
alphaValue = (3 * (1f - connection.progress)).coerceIn(0f, 1f)
...
IconButton(onClick = { /* TODO: Handle action */ }) {
Icon(
imageVector = Icons.Default.ArrowBack,
contentDescription = "Back",
tint = Color.Black.copy(alpha = alphaValue)
)
}
Text(
modifier = Modifier.weight(1f),
text = "Navigation Bar",
color = Color.Black.copy(alpha = alphaValue)
)
IconButton(onClick = { /* TODO: Handle action */ }) {
Icon(
imageVector = Icons.Default.Menu,
contentDescription = "Search",
tint = Color.Black.copy(alpha = alphaValue)
)
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment