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
DiffUtil and ListAdapter
Search
Masatoshi Kubode
April 19, 2018
Programming
0
1.8k
DiffUtil and ListAdapter
DiffUtil and ListAdapter
2018/04/19 potatotips 50
Masatoshi Kubode
April 19, 2018
Tweet
Share
More Decks by Masatoshi Kubode
See All by Masatoshi Kubode
ComposeでのShared Element Transition / Shared Element Transition in Compose
kubode
0
170
K2への完全移行結果 / Results of complete migration to K2
kubode
1
1.9k
Data Bindingの移行を楽にする / Easier migration of Data Binding
kubode
0
440
Compose Shadow Alternative
kubode
0
150
アイコンをComposeにする / Compose the Icons
kubode
0
360
デザインシステムのCompose実装 / Design system Compose implementation
kubode
0
440
KMMのCI/CD
kubode
3
690
WantedlyでのCompose導入 / Introducing Jetpack Compose at Wantedly
kubode
1
380
DroidKaigi/conference-app-2022へのContributionが楽しかった話 / Contributing DroidKaigi app was fun!
kubode
0
940
Other Decks in Programming
See All in Programming
VS Code をプロダクトにどう取り込むか
onomax
1
350
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
190
Designing for tomorrow's programming workflows
honnibal
PRO
2
120
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
670
見た目から始める生産性向上
ikumatadokoro
7
800
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
6
910
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
0
180
PostmanでAPIの動作確認が楽になった話
h455h1
0
160
Hanami and htmx
bkuhlmann
0
200
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
110
Code Reviews
bkuhlmann
4
890
エンターテイメント業界で利用されるAWS
demuyan
0
210
Featured
See All Featured
Design by the Numbers
sachag
274
18k
Designing with Data
zakiwarfel
96
4.8k
Rails Girls Zürich Keynote
gr2m
91
13k
How to Ace a Technical Interview
jacobian
272
22k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
14
1.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
Gamification - CAS2011
davidbonilla
76
4.6k
The Invisible Customer
myddelton
114
12k
A Philosophy of Restraint
colly
197
16k
Practical Orchestrator
shlominoach
182
9.7k
Transcript
©2018 Wantedly, Inc. DiffUtil and ListAdapter potatotips 50 19.Apr.2018 -
Masatoshi Kubode
©2018 Wantedly, Inc. Self introduction Masatoshi Kubode Twitter: @swiz_ard GitHub:
@kubode Qiita: @kubode Wantedly Visit UserGrowth
©2018 Wantedly, Inc. 1. DiffUtil 2. ListAdapter 3. Demo Agenda
©2018 Wantedly, Inc. DiffUtil
©2018 Wantedly, Inc. • Calculates the differences between 2 lists
• Detects change, insert, remove, move • Move detection is optional • O(n) • 1000 / 50 modifications 4.6ms on Nexus 5X DiffUtil
©2018 Wantedly, Inc. ListAdapter
©2018 Wantedly, Inc. • Added in support library 27.1.0 •
A RecyclerView.Adapter using DiffUtil • Just submitList(newItems) • Calculates the diff on a background thread • Notify diff results on the main thread ListAdapter
©2018 Wantedly, Inc. Demo ListAdapter
©2018 Wantedly, Inc. • Should not use with MutableList •
Does nothing if same instance submitted ListAdapter Important point
©2018 Wantedly, Inc. Conclusion
©2018 Wantedly, Inc. • DiffUtil automates the adapter notification •
Simplify around the adapter operations Conclusion
©2018 Wantedly, Inc. https://github.com/kubode/DiffUtil-sample Repository
©2018 Wantedly, Inc. Thanks