Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
388 views
in Technique[技术] by (71.8m points)

Does Jetpack compose release onClickListener for LazyColumnFor/LAazyRowFor?

The current version of jetpack compose is alpha-09, but couldn't find the onClickListener for LazyColumnFor(RecyclerView/Listview).If anyone have any update, it would be much appreciated.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You need to make the content clickable. For ex:

LazyColumnFor(items) { item ->
    Box(Modifier.clickable(onClick = { //handle onClick })) {
        // Your item layout
    }
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...