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.9k
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
技術を根付かせる / How to make technology take root
kubode
1
250
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
320
Google Play Consoleデベロッパー アカウントの確認 / Verifying your Play Console developer account
kubode
1
1.1k
Make your Android app into Multiplatform app
kubode
0
110
ウォンテッドリーにおけるモバイルアプリ開発 / iOSDC Japan 2024 Sponsor Session
kubode
1
830
Jetpack ComposeのBottomSheetとの戦い / Fight with BottomSheet of Jetpack Compose
kubode
0
560
Mobile Chapterが目指すところと技術 / Vision and Technology of Mobile Chapter at Wantedly
kubode
0
320
ウォンテッドリーでのKMPワークフロー / KMP workflow at Wantedly
kubode
0
1.6k
ComposeでのShared Element Transition / Shared Element Transition in Compose
kubode
0
490
Other Decks in Programming
See All in Programming
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
130
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1k
GoとPHPのインターフェイスの違い
shimabox
2
190
動作確認やテストで漏れがちな観点3選
starfish719
6
1k
クリーンアーキテクチャから見る依存の向きの大切さ
shimabox
2
560
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
130
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
SpringBoot3.4の構造化ログ #kanjava
irof
3
1k
負債になりにくいCSSをデザイナとつくるには?
fsubal
10
2.5k
2024年のWebフロントエンドのふりかえりと2025年
sakito
3
250
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
0
190
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
140
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
GitHub's CSS Performance
jonrohan
1030
460k
Code Review Best Practice
trishagee
67
18k
Navigating Team Friction
lara
183
15k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Unsuck your backbone
ammeep
669
57k
Scaling GitHub
holman
459
140k
Practical Orchestrator
shlominoach
186
10k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
KATA
mclloyd
29
14k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.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