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
97
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
290
Google Play Consoleデベロッパー アカウントの確認 / Verifying your Play Console developer account
kubode
1
1k
Make your Android app into Multiplatform app
kubode
0
96
ウォンテッドリーにおけるモバイルアプリ開発 / iOSDC Japan 2024 Sponsor Session
kubode
1
790
Jetpack ComposeのBottomSheetとの戦い / Fight with BottomSheet of Jetpack Compose
kubode
0
510
Mobile Chapterが目指すところと技術 / Vision and Technology of Mobile Chapter at Wantedly
kubode
0
310
ウォンテッドリーでのKMPワークフロー / KMP workflow at Wantedly
kubode
0
1.6k
ComposeでのShared Element Transition / Shared Element Transition in Compose
kubode
0
480
Other Decks in Programming
See All in Programming
ASP.NET Core の OpenAPIサポート
h455h1
0
160
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
260
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
2.4k
Amazon ECS とマイクロサービスから考えるシステム構成
hiyanger
1
180
Vue.jsでiOSアプリを作る方法
hal_spidernight
0
120
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
240
Azure AI Foundryのご紹介
qt_luigi
1
260
ファインディの テックブログ爆誕までの軌跡
starfish719
1
780
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
630
Fixstars高速化コンテスト2024準優勝解法
eijirou
0
200
振り返れば奴(Cline)がいる
keiyagi
0
130
WebDriver BiDiとは何なのか
yotahada3
1
100
Featured
See All Featured
Writing Fast Ruby
sferik
628
61k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
3k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Designing for Performance
lara
604
68k
Typedesign – Prime Four
hannesfritz
40
2.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.3k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
It's Worth the Effort
3n
184
28k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
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