is there a way to wrap lazylist (continue from beg...
# compose
s
is there a way to wrap lazylist (continue from beginning when it gets to the end)?
y
If by that you mean a circular list, something like this can do the job 👇
Copy code
@Composable
fun MyList(
    items: List<String>,
    modifier: Modifier = Modifier,
    onItemClick: (String) -> Unit
) {
    val listState = rememberLazyListState(Int.MAX_VALUE / 2)

    LazyColumn(
        state = listState,
        modifier = modifier
    ) {
        items(Int.MAX_VALUE, itemContent = {
            val index = it % items.size
            Text(text = items[index])    // item composable
        })
    }
}