Last active
March 1, 2021 13:44
-
-
Save raulh82vlc/372b7c6102018028391120a5cd0bd884 to your computer and use it in GitHub Desktop.
TweetsList representation of a vertical list of tweets
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
@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