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
150
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
270
Override Kotlin Property Getters and Setters
lamouresparus
0
77
Get started with the Gemini API in Android apps (client SDK)
lamouresparus
1
260
Code Surgery: Refactoring for a Healthy App
lamouresparus
0
27
Information gathering
lamouresparus
0
51
Code Surgery: Refactoring for a Healthy App
lamouresparus
0
66
Managing Technical Writing Projects
lamouresparus
0
94
DEVFEST BANJUL 2023: "Relay: The Future of Design to Code Workflows"
lamouresparus
0
150
WTM Aba Breakfast: Tech Career: Reaching Goals and Gaining Experiences
lamouresparus
0
61
Other Decks in Programming
See All in Programming
Back to the Future: Let me tell you about the ACP protocol
terhechte
0
130
ネイティブ製ガントチャートUIを作って学ぶUICollectionViewLayoutの威力
jrsaruo
0
130
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
980
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
400
クラシルを支える技術と組織
rakutek
0
190
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
660
止められない医療アプリ、そっと Swift 6 へ
medley
1
120
Swift Concurrency - 状態監視の罠
objectiveaudio
2
460
私はどうやって技術力を上げたのか
yusukebe
43
17k
メモリ不足との戦い〜大量データを扱うアプリでの実践例〜
kwzr
1
880
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
200
プログラミングどうやる? ~テスト駆動開発から学ぶ達人の型~
a_okui
0
190
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
21k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
19
1.2k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Into the Great Unknown - MozCon
thekraken
40
2.1k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Code Reviewing Like a Champion
maltzj
525
40k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
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!