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
110
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
220
Migrate to Gradle version catalog and convention plugins
tatocaster
3
2k
Make Codebases Secure with OWASP
tatocaster
0
220
Secure Coding Standards
tatocaster
0
200
ტანგო ანდროიდთან
tatocaster
0
360
Adopting Huawei Mobile Services
tatocaster
0
89
Android UI Testing & Challenges
tatocaster
1
140
Reverse & Inject - droidcon
tatocaster
3
340
mobile DevOps
tatocaster
1
170
Other Decks in Programming
See All in Programming
typoなんかねぇよ
raspython3
0
660
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
0
210
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
620
My Marp Sample
sinoue0108
0
140
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
660
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
MIZARU@SPAJAM2026 第二回予選
1901drama
0
100
Oxlintはいいぞ(続)
yug1224
1
540
Foundry Localでエージェント開発
seosoft
0
120
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
720
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.7k
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
670
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
810
Side Projects
sachag
455
43k
Mobile First: as difficult as doing things right
swwweet
225
10k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
970
Between Models and Reality
mayunak
4
450
Code Review Best Practice
trishagee
74
20k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
320
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
570
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
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