Created
January 16, 2023 15:13
-
-
Save mikkipastel/a41bfb0d7ddc080cd285a62721529b11 to your computer and use it in GitHub Desktop.
LazyColumn with Jetpack Compose (LazyListScope)
This file contains hidden or 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
class MainActivity : ComponentActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
val names = listOf("Stocker DAO", "Bittoon DAO", "Apetimism", "LonelyPop") | |
setContent { | |
MyTheme { | |
// A surface container using the 'background' color from the theme | |
Surface( | |
modifier = Modifier.fillMaxSize(), | |
color = MaterialTheme.colors.surface | |
) { | |
LazyColumn { | |
items(names) { | |
Greeting(name = it) | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment