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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Merab Tato Kutalia
May 04, 2017
Programming
2
97
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
160
ტანგო ანდროიდთან
tatocaster
0
290
Adopting Huawei Mobile Services
tatocaster
0
72
Android UI Testing & Challenges
tatocaster
1
120
Reverse & Inject - droidcon
tatocaster
3
310
mobile DevOps
tatocaster
1
140
Other Decks in Programming
See All in Programming
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
280
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
2
170
CSC307 Lecture 09
javiergs
PRO
1
850
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
190
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
210
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
160
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
200
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
310
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
450
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
2
940
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
1
270
文字コードの話
qnighy
41
15k
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
How to Ace a Technical Interview
jacobian
281
24k
Evolving SEO for Evolving Search Engines
ryanjones
0
140
Designing for Performance
lara
611
70k
Facilitating Awesome Meetings
lara
57
6.8k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
140
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
75
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
My Coaching Mixtape
mlcsv
0
61
Technical Leadership for Architectural Decision Making
baasie
2
270
Optimising Largest Contentful Paint
csswizardry
37
3.6k
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