You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to be able to click on a JetLimeItem? I'm currently looking to add a dialog once the user clicks on a JetLimeItem to display the route's information and to navigate to a map screen.
The text was updated successfully, but these errors were encountered:
Right now with the release v1.0.6 this can be only achieved using the content parameter of JetLimeItem which is a Composable lambda. We can drop all other arguments of JetLimeItem and pass only the content like this:
JetLimeItem {
val context = LocalContext.current
Text(
text = "Click me to show a toast",
style = JetLimeTypography.body1,
modifier = Modifier
.clickable {
Toast.makeText(context, "This item has been clicked", Toast.LENGTH_SHORT).show()
}
)
}
Note this is not the best solution as right now it's impossible to add a click listener to the entire JetLimeItem by design.
The only solution is the one that I just mentioned above.
I have created a separate issue here to make this library more flexible and redesign its API: #18
I will close this issue for now and track this on the new issue created.
Is there a way to be able to click on a JetLimeItem? I'm currently looking to add a dialog once the user clicks on a JetLimeItem to display the route's information and to navigate to a map screen.
The text was updated successfully, but these errors were encountered: