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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Masatoshi Kubode
April 19, 2018
Programming
0
2k
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
3リポジトリーを2ヶ月でモノレポ化した話 / How I turned 3 repositories into a monorepo in 2 months
kubode
0
130
ウォンテッドリーの「ココロオドル」モバイル開発 / Wantedly's "kokoro odoru" mobile development
kubode
2
1.2k
Firebase Dynamic Linksの代替手段を自作する / Create your own Firebase Dynamic Links alternative
kubode
0
640
技術を根付かせる / How to make technology take root
kubode
1
450
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
570
Google Play Consoleデベロッパー アカウントの確認 / Verifying your Play Console developer account
kubode
1
1.4k
Make your Android app into Multiplatform app
kubode
0
200
ウォンテッドリーにおけるモバイルアプリ開発 / iOSDC Japan 2024 Sponsor Session
kubode
1
1.4k
Jetpack ComposeのBottomSheetとの戦い / Fight with BottomSheet of Jetpack Compose
kubode
0
1k
Other Decks in Programming
See All in Programming
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
700
2026年 エンジニアリング自己学習法
yumechi
0
130
Data-Centric Kaggle
isax1015
2
760
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.4k
Fragmented Architectures
denyspoltorak
0
150
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
610
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
970
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
550
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
510
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
79
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Designing for Performance
lara
610
70k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
The Invisible Side of Design
smashingmag
302
51k
Making Projects Easy
brettharned
120
6.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
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