Skip to content

Instantly share code, notes, and snippets.

@AlankritaShah
Created October 27, 2022 21:02
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 AlankritaShah/bde8f286d0090f7750313176cc80f65a to your computer and use it in GitHub Desktop.
Save AlankritaShah/bde8f286d0090f7750313176cc80f65a to your computer and use it in GitHub Desktop.
@Preview(showBackground = true)
@Composable
fun ComposeArticlePreview() {
ComposeExampleTheme {
ComposeArticle(
"Jetpack Compose tutorial",
"Jetpack Compose is a modern toolkit for building native Android UI. Compose simplifies and accelerates UI development on Android with less code, powerful tools, and intuitive Kotlin APIs.",
"In this tutorial, you build a simple UI component with declarative functions. You call Compose functions to say what elements you want and the Compose compiler does the rest. Compose is built around Composable functions. These functions let you define your app\\'s UI programmatically because they let you describe how it should look and provide data dependencies, rather than focus on the process of the UI\\'s construction, such as initializing an element and then attaching it to a parent. To create a Composable function, you add the @Composable annotation to the function name.",
R.drawable.ic_launcher_background)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment