Skip to content

Add Compose to a View based app #34

@hogansung

Description

@hogansung

In the second point under section Add ComposeView, the correct code snippet should be

import androidx.compose.ui.platform.ComposeView

class JuiceListViewHolder(
    private val composeView: ComposeView,  // this line is missing..
    private val onEdit: (Juice) -> Unit,
    private val onDelete: (Juice) -> Unit
): RecyclerView.ViewHolder(composeView) 

It took me almost an hour to figure this out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions