Jetpack Compose Flashcards
What is Jetpack Compose?
Jetpack Compose is Android’s modern toolkit for building native UI that simplifies and
accelerates UI development on Android.
What are the advantages of Jetpack Compose?
– Less/concise code
– Powerful tools
– Intuitive Kotlin APIs
– Accelerated development
Differentiate the use of jetpack compose from that xml layouts
Jetpack Compose utilizes declarative functions in building simple UI components rather than the use of XML layouts/layout editor, domiciled in the layout subfolder under the res folder.
Explain the use of the compose compiler and composable functions
Using this toolkit, composable functions are called to define what elements are required,
then the Compose compiler does the rest of the work.
What are the key lessons about the Jetpack Compose
one needs to learn to become competent in using the toolkit?
– Composable functions
– Layouts
– Material design
– Lists and animations
Explain the function and use of composable functions. How is a composable function declared?
● Jetpack Compose is built around composable functions.
● Composable functions let one define an app’s UI programmatically by describing how it should look and providing data dependencies rather than
focusing on the process of the UI’s construction, usually required when dealing with XML layouts.
● To create a composable function, one needs to add the @Composable annotation to the function name.
How is a UI hierarchy built in Compose
● UI elements are hierarchical, with elements contained in other elements.
● In Compose, one builds a UI hierarchy by calling composable functions from other composable functions.
What is Material Design
● Compose is built to support Material Design principles.
● Material Design is an Android-oriented design language created by Google/Alphabet,
supporting onscreen touch experiences via cuerich features and natural motions that mimic realworld objects.
● Many of Compose’s UI elements implement Material Design out of the box.
Describe Lists and Animations
● Lists and animations make any application more interactive and interesting.
● Compose has the ability to make it easy to create lists and animations