Skip to content

Instantly share code, notes, and snippets.

@vitoksmile
Created February 11, 2025 18:06
Show Gist options
  • Select an option

  • Save vitoksmile/f3702290812a173a4aaf38df65671989 to your computer and use it in GitHub Desktop.

Select an option

Save vitoksmile/f3702290812a173a4aaf38df65671989 to your computer and use it in GitHub Desktop.
ComposeHints
val topAppBarHint = rememberHint {
OutlinedButton(onClick = {}) { Text("Hint for TopAppBar") }
}
val topAppBarActionHintAnchor = rememberHintAnchorState(topAppBarHint)
val actionHint = rememberHint {
Text("Hint for Action")
}
val actionHintAnchor = rememberHintAnchorState(actionHint)
val bottomNavigationHint = rememberHint {
Row(
verticalAlignment = Alignment.CenterVertically,
) {
Spacer(Modifier.size(32.dp).background(Color.Magenta, CircleShape))
Spacer(Modifier.size(8.dp))
Text("Hint for BottomNavigation")
}
}
val bottomNavigationHintAnchor = rememberHintAnchorState(bottomNavigationHint)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment