Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
DevFest Uyo—Jetpack compose: Game changer for b...
Search
Love
November 13, 2021
Programming
0
130
DevFest Uyo—Jetpack compose: Game changer for building Modern Android UI
Love
November 13, 2021
Tweet
Share
More Decks by Love
See All by Love
Introduction to Kotlin Multiplatform: Write Once, Run Everywhere
lamouresparus
0
120
Override Kotlin Property Getters and Setters
lamouresparus
0
34
Get started with the Gemini API in Android apps (client SDK)
lamouresparus
1
170
Code Surgery: Refactoring for a Healthy App
lamouresparus
0
11
Information gathering
lamouresparus
0
30
Code Surgery: Refactoring for a Healthy App
lamouresparus
0
44
Managing Technical Writing Projects
lamouresparus
0
68
DEVFEST BANJUL 2023: "Relay: The Future of Design to Code Workflows"
lamouresparus
0
100
WTM Aba Breakfast: Tech Career: Reaching Goals and Gaining Experiences
lamouresparus
0
46
Other Decks in Programming
See All in Programming
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
暇に任せてProxmoxコンソール 作ってみました
karugamo
1
720
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
730
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
330
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
130
Symfony Mapper Component
soyuka
2
730
Recoilを剥がしている話
kirik
5
6.6k
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
720
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
180
nekko cloudにおけるProxmox VE利用事例
irumaru
3
430
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Designing for Performance
lara
604
68k
Building Your Own Lightsaber
phodgson
103
6.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Navigating Team Friction
lara
183
15k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
It's Worth the Effort
3n
183
28k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Bash Introduction
62gerente
608
210k
Transcript
Jetpack Compose: Game changer for building Modern Android UI Love
Sparus O’tudor Android Engineer, FrontendLabs Uyo
What is Jetpack Compose? Holla Jetty Packy😊
Jetpack Compose is a modern declarative UI Toolkit to simplify
and accelerate native Android UI development.
What ever happened to our famous XML?🤔
Different Languages 30+ thousands lines of code Cognitive Overhead Multiple
Files Deprecated Code Boilerplate Codes Multiple layers of inheritance Problems with the Traditional View System
UI logic and definition are completely Separate Uses XML Satic
Layout Definition Kotlin/Java Dynamic Logic & Behaviour Completely Separate Generates a lot of boilerplate codes
A Quick Look at Jetpack Compose
Jetpack Compose favours Composition over Inheritance is a Human has
a Composition Inheritance
Declarative UI Focus on the “WHAT” and not the “HOW”
Jetpack Compose is a function of State Anytime the “state“
changes the “compose UI” changes also.
@Preview @Composable setContent{} Compose Preview Material Theme
Composable Functions • Annotated with @Composable • @Composable informs the
compiler that the function is intended to convert data into UI. • Can accept parameters • Returns nothing
Composable Functions
“Composable functions can only be called in the context of
another compose function...”
setContent{} • The setContent block defines the activity's layout where
we call composable functions. • The content becomes the root view of the activity. • More like setContentView() in XML.
setContent{}
Material Theme • An implementation of Material Design. • Define
the applications theme with its respective colors, shapes, font, etc. • Can be customized. • Mostly the root element of the screen.
Material Theme
Modifier • An ordered, immutable collection of modifier elements that
decorate or add behavior to Compose UI elements. • Modifiers can be chained. • Their chaining order is important.
Modifier
Layouts Column Row Box Constraint Layout
Column
Row
Box
Say Goodbye to RecyclerView Welcome LazyRow and LazyColumn 🤩
Managing Lists In Compose • Compose makes it easy to
create lists. • These composables render only the elements that are visible on screen.
LazyRow A LazyRow is a horizontally scrolling list that only
composes and lays out the currently visible items.
LazyColumn A LazyColumn is a vertically scrolling list.
LazyVerticalGrid • A LazyColumn is a vertically scrolling grid. •
It accepts the number of grid items in one row or the minimum width of one item. • Unstable API.
LazyVerticalGrid
More Components • Button • Image • Icons, etc.
Ready to take a deep dive?
Additional Resources • Jetpack Compose Tutorial on developer.android • Jetpack
Compose basics Codelab • Under the hood of Jetpack Compose • Get started with Jetpack Compose • Jetpack Compose basics | Workshop
Questions?
Thank You!