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
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
520
NakouPAY説明用
annouim0
0
170
tRPCの概要と少しだけパフォーマンス
misoton665
2
210
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
970
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
6.5k
Running Swift without an OS
kishikawakatsumi
0
840
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
270
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
140
CDK Deployのための ”反響定位”
watany
4
780
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
500
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
0
150
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
130
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
130
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
370
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
310
The Language of Interfaces
destraynor
162
26k
Become a Pro
speakerdeck
PRO
31
5.9k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
210
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
A Tale of Four Properties
chriscoyier
163
24k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
100
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