2
Most read
4
Most read
Kotlin Jetpack Tutorial
What’s in it for you ?
What is Kotlin Jetpack Compose?
Why Jetpack compose?
How does Compose work
Composable function
Layouts
Material design
List and animation
What is Kotlin Jetpack compose?
The Kotlin Jetpack compose is a modern User interface
development toolkit for building Android UI.
With the help of Jetpack compose, we can make more declarative
UI code with few lines of code.
Before Jetpack Compose, XML layouts were used to make a
native User interface.
Why Jetpack compose?
Jetpack
Compose
Accelerates
development
Independent
Intuitive
Powerful
and Feature
loaded
How does compose work?
The jetpack compose works on a composite design pattern.
This pattern is used while dealing with hierarchical data like a
parent-child relationship.
In compose, every view can contain one or more child views within
it, and the child views can further have
sub-child views.
Composable function
A composable function is just like any other normal function of Kotlin but
the only difference is it is annotated by the @Composable sign.
It helps in transforming the data to User interface hierarchy.
All the functions with the @Compsoable sign indicate that this function
is the compose function.
Composable function
@Composable
fun Message(name: String) {
Text(text = "Hey $name!")
}
@Preview
@Composable
fun PreviewMessage() {
Message(“Rahul")
}
Composable annotation is used
to make the function composable
function
The element text is also composable which
comes from compose library
The @Preview annotation helps us to see
how our UI is going to look like
Layout
Layouts allows us to arrange the components in such a way so that they
don’t overlap each other.
It allows to arrange the components in a proper manner.
Layout is a composable function that allows us to arrange elements in
• Row
• Column
• Box
Layout
@Composable
fun Example(){
Row{
Text(text = "Hello ")
Text(text = " there ")
Text(text = “mate")
}
}
@Composable
fun Example(){
Column{
Text(text = "Hello ")
Text(text = " there ")
Text(text = “mate")
}
}
The Column function lets you arrange
elements vertically
The Row function lets you arrange
elements horizontally
Box
@Composable
fun Example(){
Box{
Text(text = "Hello", modifier = Modifier.align(Alignment.TopCenter))
Text(text = “Rahul", modifier = Modifier.align(Alignment.BottomCenter))
}
}
In Box layout, the children are stacked over each
other. So we have to align them to put them in
different positions
7
1
2
3
4
5
6
8
9
Alignment.CenterEnd
Alignment.Center
Alignment.BottomStart
Alignment.BottomEnd
Alignment.CenterStart
Alignment.TopCenter
Alignment.TopStart
Alignment.TopEnd
Alignment.BottomCenter
Box
Material design
As the name suggests, it helps to improve the appearance using the
Material design styling.
There are three pillars of material design:
• Color
• Typography
• Shape
Material design
Shape
Material design allows us to
define shape for small,
medium and large
components as well
Typography
Typography is used to
style or define a type
system
Color
By using values from
wrapped theme, you can
easily color wherever it is
needed
Material design
List and animations
The List and animations are one of the most important concepts for
building an app.
Lazy composables are used when we wish to display items of unknown
length.
These components include LazyRow and LazyColumn.
List and animations
Here we are adding a single item
Here we are adding a multiple items
LazyColumn {
item {
Text(text = "First element")
}
items(7) { index ->
Text(text = “Element: $index")
}
}
LazyRow makes a horizontal
scrolling list
LazyColumn makes a vertical
scrolling list
Here we are adding a multiple items
List and animations
The Animations are very important for smooth and attractive user
experience.
There are various APIs that give you control and help with the animation.
• AnimationVisibility
• Animation
• Crossfade
• rememberInfiniteTransition
• updateTransition
Kotlin Jetpack Tutorial

More Related Content

PPTX
Jetpack Compose.pptx
PDF
Declarative UIs with Jetpack Compose
PDF
Jetpack Compose a new way to implement UI on Android
PDF
Try Jetpack Compose
PDF
Android Jetpack Compose - Turkey 2021
PPTX
Kotlin Basics & Introduction to Jetpack Compose.pptx
PDF
Compose Camp - Jetpack Compose for Android Developers Introduction Session De...
PPTX
Android jetpack compose | Declarative UI
Jetpack Compose.pptx
Declarative UIs with Jetpack Compose
Jetpack Compose a new way to implement UI on Android
Try Jetpack Compose
Android Jetpack Compose - Turkey 2021
Kotlin Basics & Introduction to Jetpack Compose.pptx
Compose Camp - Jetpack Compose for Android Developers Introduction Session De...
Android jetpack compose | Declarative UI

What's hot (20)

PDF
Jetpack Compose.pdf
PDF
Jetpack compose
PDF
Jetpack Compose - A Lightning Tour
PPTX
Jetpack Compose - Android’s modern toolkit for building native UI
PPTX
Introduction to react_js
PPT
Core java concepts
PDF
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
PPTX
Kotlin on android
PPTX
React js programming concept
PPTX
PPTX
Modern app development with Jetpack Compose.pptx
PPTX
Spring Boot Tutorial
PPTX
PDF
Swift Programming Language
PDF
Asynchronous JavaScript Programming
PDF
RxJS Evolved
PPTX
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
PDF
Java ArrayList Tutorial | Edureka
PDF
React new features and intro to Hooks
PDF
Best Practices in Qt Quick/QML - Part III
 
Jetpack Compose.pdf
Jetpack compose
Jetpack Compose - A Lightning Tour
Jetpack Compose - Android’s modern toolkit for building native UI
Introduction to react_js
Core java concepts
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
Kotlin on android
React js programming concept
Modern app development with Jetpack Compose.pptx
Spring Boot Tutorial
Swift Programming Language
Asynchronous JavaScript Programming
RxJS Evolved
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java ArrayList Tutorial | Edureka
React new features and intro to Hooks
Best Practices in Qt Quick/QML - Part III
 
Ad

Similar to Kotlin Jetpack Tutorial (20)

PPTX
Compose camp 2.pptx
PDF
Diving deep in compose.pdf
PDF
Mobile Programming - 3 Rows, Column and Basic Sizing
PPTX
Day 2.pptx
PDF
compose_speaker_session.pdf
PDF
Compose Camp Day 3 PPT.pptx.pdf
PPTX
Compose Camp Day 2.pptx
PDF
Andriod Blueprint @ AISSMS Institute Of Information Techonology
PDF
Mobile Programming - 6 Textfields, Button, Showing Snackbars and Lists
PPTX
Kotlin With JetPack Compose Presentation
PDF
Mobile Programming - 2 Jetpack Compose
PDF
What's new in android: jetpack compose 2024
PDF
COMPOSE CAMP SESSION 4.pdf
PDF
Mobile Programming - 5 Stylling Text and State
PPTX
Compose in Theory
PPTX
compose 3.pptx
PDF
Compose Camp session 2.pptx.pdf
PDF
Jetpack Compose beginner.pdf
PDF
Introduction to compose camps.pdf
PDF
Compose Camp 1.pdf
Compose camp 2.pptx
Diving deep in compose.pdf
Mobile Programming - 3 Rows, Column and Basic Sizing
Day 2.pptx
compose_speaker_session.pdf
Compose Camp Day 3 PPT.pptx.pdf
Compose Camp Day 2.pptx
Andriod Blueprint @ AISSMS Institute Of Information Techonology
Mobile Programming - 6 Textfields, Button, Showing Snackbars and Lists
Kotlin With JetPack Compose Presentation
Mobile Programming - 2 Jetpack Compose
What's new in android: jetpack compose 2024
COMPOSE CAMP SESSION 4.pdf
Mobile Programming - 5 Stylling Text and State
Compose in Theory
compose 3.pptx
Compose Camp session 2.pptx.pdf
Jetpack Compose beginner.pdf
Introduction to compose camps.pdf
Compose Camp 1.pdf
Ad

More from Simplilearn (20)

PPTX
Top 50 Scrum Master Interview Questions | Scrum Master Interview Questions & ...
PPTX
Bagging Vs Boosting In Machine Learning | Ensemble Learning In Machine Learni...
PPTX
Future Of Social Media | Social Media Trends and Strategies 2025 | Instagram ...
PPTX
SQL Query Optimization | SQL Query Optimization Techniques | SQL Basics | SQL...
PPTX
SQL INterview Questions .pTop 45 SQL Interview Questions And Answers In 2025 ...
PPTX
How To Start Influencer Marketing Business | Influencer Marketing For Beginne...
PPTX
Cyber Security Roadmap 2025 | How To Become Cyber Security Engineer In 2025 |...
PPTX
How To Become An AI And ML Engineer In 2025 | AI Engineer Roadmap | AI ML Car...
PPTX
What Is GitHub Copilot? | How To Use GitHub Copilot? | How does GitHub Copilo...
PPTX
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
PPTX
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
PPTX
Top 7 High Paying AI Certifications Courses For 2025 | Best AI Certifications...
PPTX
Data Cleaning In Data Mining | Step by Step Data Cleaning Process | Data Clea...
PPTX
Top 10 Data Analyst Projects For 2025 | Data Analyst Projects | Data Analysis...
PPTX
AI Engineer Roadmap 2025 | AI Engineer Roadmap For Beginners | AI Engineer Ca...
PPTX
Machine Learning Roadmap 2025 | Machine Learning Engineer Roadmap For Beginne...
PPTX
Kotter's 8-Step Change Model Explained | Kotter's Change Management Model | S...
PPTX
Gen AI Engineer Roadmap For 2025 | How To Become Gen AI Engineer In 2025 | Si...
PPTX
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
PPTX
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Top 50 Scrum Master Interview Questions | Scrum Master Interview Questions & ...
Bagging Vs Boosting In Machine Learning | Ensemble Learning In Machine Learni...
Future Of Social Media | Social Media Trends and Strategies 2025 | Instagram ...
SQL Query Optimization | SQL Query Optimization Techniques | SQL Basics | SQL...
SQL INterview Questions .pTop 45 SQL Interview Questions And Answers In 2025 ...
How To Start Influencer Marketing Business | Influencer Marketing For Beginne...
Cyber Security Roadmap 2025 | How To Become Cyber Security Engineer In 2025 |...
How To Become An AI And ML Engineer In 2025 | AI Engineer Roadmap | AI ML Car...
What Is GitHub Copilot? | How To Use GitHub Copilot? | How does GitHub Copilo...
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Top 7 High Paying AI Certifications Courses For 2025 | Best AI Certifications...
Data Cleaning In Data Mining | Step by Step Data Cleaning Process | Data Clea...
Top 10 Data Analyst Projects For 2025 | Data Analyst Projects | Data Analysis...
AI Engineer Roadmap 2025 | AI Engineer Roadmap For Beginners | AI Engineer Ca...
Machine Learning Roadmap 2025 | Machine Learning Engineer Roadmap For Beginne...
Kotter's 8-Step Change Model Explained | Kotter's Change Management Model | S...
Gen AI Engineer Roadmap For 2025 | How To Become Gen AI Engineer In 2025 | Si...
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...

Recently uploaded (20)

PPTX
Ppt obs emergecy.pptxydirnbduejguxjjdjidjdbuc
PDF
FAMILY PLANNING (preventative and social medicine pdf)
PDF
LATAM’s Top EdTech Innovators Transforming Learning in 2025.pdf
PPTX
Approach to a child with acute kidney injury
PDF
Physical pharmaceutics two in b pharmacy
PPTX
INTRODUCTION TO PHILOSOPHY FULL SEM - COMPLETE.pptxINTRODUCTION TO PHILOSOPHY...
DOCX
HELMET DETECTION AND BIOMETRIC BASED VEHICLESECURITY USING MACHINE LEARNING.docx
PDF
anganwadi services for the b.sc nursing and GNM
PPTX
principlesofmanagementsem1slides-131211060335-phpapp01 (1).ppt
PDF
WHAT NURSES SAY_ COMMUNICATION BEHAVIORS ASSOCIATED WITH THE COMP.pdf
PPTX
MMW-CHAPTER-1-final.pptx major Elementary Education
PPTX
Key-Features-of-the-SHS-Program-v4-Slides (3) PPT2.pptx
PDF
HSE 2022-2023.pdf الصحه والسلامه هندسه نفط
PDF
Global strategy and action plan on oral health 2023 - 2030.pdf
PPTX
Unit1_Kumod_deeplearning.pptx DEEP LEARNING
PPTX
PAIN PATHWAY & MANAGEMENT OF ACUTE AND CHRONIC PAIN SPEAKER: Dr. Rajasekhar ...
PDF
Kalaari-SaaS-Founder-Playbook-2024-Edition-.pdf
PPTX
GW4 BioMed Candidate Support Webinar 2025
PDF
IS1343_2012...........................pdf
PPTX
Neurological complocations of systemic disease
Ppt obs emergecy.pptxydirnbduejguxjjdjidjdbuc
FAMILY PLANNING (preventative and social medicine pdf)
LATAM’s Top EdTech Innovators Transforming Learning in 2025.pdf
Approach to a child with acute kidney injury
Physical pharmaceutics two in b pharmacy
INTRODUCTION TO PHILOSOPHY FULL SEM - COMPLETE.pptxINTRODUCTION TO PHILOSOPHY...
HELMET DETECTION AND BIOMETRIC BASED VEHICLESECURITY USING MACHINE LEARNING.docx
anganwadi services for the b.sc nursing and GNM
principlesofmanagementsem1slides-131211060335-phpapp01 (1).ppt
WHAT NURSES SAY_ COMMUNICATION BEHAVIORS ASSOCIATED WITH THE COMP.pdf
MMW-CHAPTER-1-final.pptx major Elementary Education
Key-Features-of-the-SHS-Program-v4-Slides (3) PPT2.pptx
HSE 2022-2023.pdf الصحه والسلامه هندسه نفط
Global strategy and action plan on oral health 2023 - 2030.pdf
Unit1_Kumod_deeplearning.pptx DEEP LEARNING
PAIN PATHWAY & MANAGEMENT OF ACUTE AND CHRONIC PAIN SPEAKER: Dr. Rajasekhar ...
Kalaari-SaaS-Founder-Playbook-2024-Edition-.pdf
GW4 BioMed Candidate Support Webinar 2025
IS1343_2012...........................pdf
Neurological complocations of systemic disease

Kotlin Jetpack Tutorial

  • 2. What’s in it for you ? What is Kotlin Jetpack Compose? Why Jetpack compose? How does Compose work Composable function Layouts Material design List and animation
  • 3. What is Kotlin Jetpack compose? The Kotlin Jetpack compose is a modern User interface development toolkit for building Android UI. With the help of Jetpack compose, we can make more declarative UI code with few lines of code. Before Jetpack Compose, XML layouts were used to make a native User interface.
  • 5. How does compose work? The jetpack compose works on a composite design pattern. This pattern is used while dealing with hierarchical data like a parent-child relationship. In compose, every view can contain one or more child views within it, and the child views can further have sub-child views.
  • 6. Composable function A composable function is just like any other normal function of Kotlin but the only difference is it is annotated by the @Composable sign. It helps in transforming the data to User interface hierarchy. All the functions with the @Compsoable sign indicate that this function is the compose function.
  • 7. Composable function @Composable fun Message(name: String) { Text(text = "Hey $name!") } @Preview @Composable fun PreviewMessage() { Message(“Rahul") } Composable annotation is used to make the function composable function The element text is also composable which comes from compose library The @Preview annotation helps us to see how our UI is going to look like
  • 8. Layout Layouts allows us to arrange the components in such a way so that they don’t overlap each other. It allows to arrange the components in a proper manner. Layout is a composable function that allows us to arrange elements in • Row • Column • Box
  • 9. Layout @Composable fun Example(){ Row{ Text(text = "Hello ") Text(text = " there ") Text(text = “mate") } } @Composable fun Example(){ Column{ Text(text = "Hello ") Text(text = " there ") Text(text = “mate") } } The Column function lets you arrange elements vertically The Row function lets you arrange elements horizontally
  • 10. Box @Composable fun Example(){ Box{ Text(text = "Hello", modifier = Modifier.align(Alignment.TopCenter)) Text(text = “Rahul", modifier = Modifier.align(Alignment.BottomCenter)) } } In Box layout, the children are stacked over each other. So we have to align them to put them in different positions
  • 12. Material design As the name suggests, it helps to improve the appearance using the Material design styling. There are three pillars of material design: • Color • Typography • Shape
  • 13. Material design Shape Material design allows us to define shape for small, medium and large components as well Typography Typography is used to style or define a type system Color By using values from wrapped theme, you can easily color wherever it is needed Material design
  • 14. List and animations The List and animations are one of the most important concepts for building an app. Lazy composables are used when we wish to display items of unknown length. These components include LazyRow and LazyColumn.
  • 15. List and animations Here we are adding a single item Here we are adding a multiple items LazyColumn { item { Text(text = "First element") } items(7) { index -> Text(text = “Element: $index") } } LazyRow makes a horizontal scrolling list LazyColumn makes a vertical scrolling list Here we are adding a multiple items
  • 16. List and animations The Animations are very important for smooth and attractive user experience. There are various APIs that give you control and help with the animation. • AnimationVisibility • Animation • Crossfade • rememberInfiniteTransition • updateTransition