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
Facebook Litho
Search
Merab Tato Kutalia
May 04, 2017
Programming
100
2
Share
Facebook Litho
Droid Up 7.0 , 2017 talk about Facebook Litho
Merab Tato Kutalia
May 04, 2017
More Decks by Merab Tato Kutalia
See All by Merab Tato Kutalia
What's new in Android 14?
tatocaster
0
190
Migrate to Gradle version catalog and convention plugins
tatocaster
3
1.9k
Make Codebases Secure with OWASP
tatocaster
0
210
Secure Coding Standards
tatocaster
0
170
ტანგო ანდროიდთან
tatocaster
0
320
Adopting Huawei Mobile Services
tatocaster
0
79
Android UI Testing & Challenges
tatocaster
1
120
Reverse & Inject - droidcon
tatocaster
3
320
mobile DevOps
tatocaster
1
150
Other Decks in Programming
See All in Programming
PDI: Como Alavancar Sua Carreira e Seu Negócio
marcelgsantos
0
120
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
270
Running Swift without an OS
kishikawakatsumi
0
840
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
270
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
3
310
Back to the roots of date
jinroq
0
100
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
380
The Less-Told Story of Socket Timeouts
coe401_
3
310
10 Tips of AWS ~Gen AI on AWS~
licux
5
410
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
110
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
1
180
Angular Signal Forms
debug_mode
0
110
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
Leo the Paperboy
mayatellez
7
1.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
160
Paper Plane
katiecoart
PRO
1
49k
We Have a Design System, Now What?
morganepeng
55
8.1k
Music & Morning Musume
bryan
47
7.2k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
680
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
130
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
160
Test your architecture with Archunit
thirion
1
2.2k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
730
Transcript
Facebook Litho A declarative UI framework for Android
Tato Kutalia tatocaster tatocaster.me github.com/tatocaster twitter.com/@tatokutalia
Litho’s History
Litho’s History iOS Platform, now known as Texture(Pinterest).
Litho Appeared @ Facebook F8 primarily built to implement complex
scrollable UIs based on RecyclerView.
Litho - View flattening - Declarative - AsyncLayout - Recycling
- Good Debugging Tools a declarative framework for building efficient UIs
Litho uses Yoga, also by Facebook cross-platform layout engine Everything
is a component immutable inputs knowns as Props React Terminology
Litho Core Elements State Props LayoutSpec - groups existing components
together in an immutable layout tree. MountSpec - defines a component that can render views or drawables.
Litho Recycler
Litho Touch and Click @LayoutSpec class ListItemSpec { @OnCreateLayout static
ComponentLayout onCreateLayout( ComponentContext c, @Prop(optional = true, resType = ResType.DIMEN_OFFSET) int shadowRadius, @Prop int color, @Prop String title, @Prop String subtitle) { return Column.create(c) .paddingDip(ALL, 16) .backgroundColor(color) .child( Text.create(c) .text(title) .textSizeSp(40)) .child( Text.create(c) .text(subtitle) .textStyle(ITALIC) .textSizeSp(20)) .clickHandler(ListItem.onClick(c)) .build(); } @OnEvent(ClickEvent.class) static void onClick(ComponentContext c, @FromEvent View view, @Prop OnListItemClickListener listener) { listener.onListItemClick(view); }
Litho Custom View
Litho Install // Litho compile 'com.facebook.litho:litho-core:0.2.0' compile 'com.facebook.litho:litho-widget:0.2.0' provided 'com.facebook.litho:litho-annotations:0.2.0'
annotationProcessor 'com.facebook.litho:litho-processor:0.2.0' // SoLoader compile 'com.facebook.soloader:soloader:0.2.0' // Optional // For debugging debugCompile 'com.facebook.litho:litho-stetho:0.2.0' //stetho itself compile 'com.facebook.stetho:stetho:1.5.0'
Litho Summary and Demo