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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Merab Tato Kutalia
May 04, 2017
Programming
2
100
Facebook Litho
Droid Up 7.0 , 2017 talk about Facebook Litho
Merab Tato Kutalia
May 04, 2017
Tweet
Share
More Decks by Merab Tato Kutalia
See All by Merab Tato Kutalia
What's new in Android 14?
tatocaster
0
180
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
300
Adopting Huawei Mobile Services
tatocaster
0
76
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
AI活用のコスパを最大化する方法
ochtum
0
230
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
140
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
6
2.3k
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
400
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
260
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
640
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.5k
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
150
条件判定に名前、つけてますか? #phperkaigi #c
77web
1
270
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
260
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
170
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
440
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Speed Design
sergeychernyshev
33
1.6k
Visualization
eitanlees
150
17k
Building the Perfect Custom Keyboard
takai
2
710
Chasing Engaging Ingredients in Design
codingconduct
0
140
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
140
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
640
The Curse of the Amulet
leimatthew05
1
10k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Tell your own story through comics
letsgokoyo
1
850
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