Skip to content

Instantly share code, notes, and snippets.

@raulh82vlc
Last active March 1, 2021 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raulh82vlc/372b7c6102018028391120a5cd0bd884 to your computer and use it in GitHub Desktop.
Save raulh82vlc/372b7c6102018028391120a5cd0bd884 to your computer and use it in GitHub Desktop.
TweetsList representation of a vertical list of tweets
@ExperimentalFoundationApi
@Composable
@Preview
fun TweetsList(tweets: List<Tweet>) {
LazyVerticalGrid(
modifier = Modifier.fillMaxWidth(),
cells = GridCells.Fixed(2)
){
items(
count = tweets.size,
itemContent = { index -> TweetBox(tweet = tweets[index]) }
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment