Gonz Campos
Gonz Campos

Reputation: 68

Jetpack Compose LazyList not showing items correctly

world!

I've been playing with Jetpack Compose for a while, and I've had really good results. However, I found this problem: I have a list of items, and I use a LazyColumn to show them to the user. But when I scroll up and down, some items are not displayed correctly and they show up like there is no information in them.

I don't know if I'm missing something or this behavior will be corrected in the future.

How it looks

My code:

LazyColumn(
    modifier = modifier
        .fillMaxHeight(),
) {
    items(expenses, Expense::id) { expense ->
        ExpenseItem(expense = expense, areExpensesSelectable,
            onExpenseLongClick = { onExpenseLongClick?.invoke() },
            onExpenseSelected = { onExpenseSelected?.invoke(it) },
            onExpenseDeselected = { onExpenseDeselected?.invoke(it) })
    }
}

Upvotes: 0

Views: 1422

Answers (2)

Gonz Campos
Gonz Campos

Reputation: 68

Self response: this was a bug present in Jetpack Compose until fixed in version beta08.

Upvotes: 1

Richard Onslow Roper
Richard Onslow Roper

Reputation: 6835

I hear this bug is fixed in the latest version of Compose.

Upvotes: 0

Related Questions