Created
December 17, 2022 09:35
-
-
Save MrNtlu/0e9170fe4bdc3e67e36611cb0b47bf18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LazyColumn(state = lazyColumnListState) { | |
items( | |
items = articles, | |
key = { it.url }, | |
) { article -> | |
Text( | |
modifier = Modifier | |
.height(75.dp), | |
text = article.title, | |
) | |
Divider() | |
} | |
item ( | |
key = viewModel.listState, | |
) { | |
when(viewModel.listState) { | |
ListState.LOADING -> { | |
Loading() | |
} | |
ListState.PAGINATING -> { | |
PaginationLoading() | |
} | |
ListState.PAGINATION_EXHAUST -> { | |
PaginationExhaust() | |
} | |
else -> {} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment