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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Masatoshi Kubode
April 19, 2018
Programming
2k
0
Share
DiffUtil and ListAdapter
DiffUtil and ListAdapter
2018/04/19 potatotips 50
Masatoshi Kubode
April 19, 2018
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
200
ウォンテッドリーの「ココロオドル」モバイル開発 / Wantedly's "kokoro odoru" mobile development
kubode
2
1.3k
Firebase Dynamic Linksの代替手段を自作する / Create your own Firebase Dynamic Links alternative
kubode
0
700
技術を根付かせる / How to make technology take root
kubode
1
490
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
620
Google Play Consoleデベロッパー アカウントの確認 / Verifying your Play Console developer account
kubode
1
1.4k
Make your Android app into Multiplatform app
kubode
0
230
ウォンテッドリーにおけるモバイルアプリ開発 / iOSDC Japan 2024 Sponsor Session
kubode
1
1.5k
Jetpack ComposeのBottomSheetとの戦い / Fight with BottomSheet of Jetpack Compose
kubode
0
1.1k
Other Decks in Programming
See All in Programming
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.8k
GitHubCopilotCLIをはじめよう.pdf
htkym
0
340
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
520
Back to the roots of date
jinroq
0
870
ふにゃっとしない名前の付け方 〜哲学で茹で上げる、コシのあるソフトウェア設計〜
shimomura
0
120
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
3
180
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
390
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
190
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
1
150
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
210
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
3
960
PHPでローカル環境用のSSL/TLS証明書を発行することはできるのか? #phpconkagawa
akase244
0
370
Featured
See All Featured
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
740
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
510
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
180
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
530
Optimizing for Happiness
mojombo
378
71k
We Are The Robots
honzajavorek
0
230
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
220
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