Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
Google Play Consoleデベロッパー アカウントの確認 / Verifying your Play Console developer account
kubode
0
720
Make your Android app into Multiplatform app
kubode
0
72
ウォンテッドリーにおけるモバイルアプリ開発 / iOSDC Japan 2024 Sponsor Session
kubode
1
480
Jetpack ComposeのBottomSheetとの戦い / Fight with BottomSheet of Jetpack Compose
kubode
0
370
Mobile Chapterが目指すところと技術 / Vision and Technology of Mobile Chapter at Wantedly
kubode
0
280
ウォンテッドリーでのKMPワークフロー / KMP workflow at Wantedly
kubode
0
1.6k
ComposeでのShared Element Transition / Shared Element Transition in Compose
kubode
0
430
K2への完全移行結果 / Results of complete migration to K2
kubode
2
5.9k
Data Bindingの移行を楽にする / Easier migration of Data Binding
kubode
0
1.5k
Other Decks in Programming
See All in Programming
React への依存を最小にするフロントエンド設計
takonda
21
8.3k
Cognitoが大型アップデート!Managed Loginとパスワードレスログインを実際に使ってみた@しむそくRadio Special Day1
tmhirai
2
120
@nifty天気予報:フルリニューアルの挑戦 - NIFTY Tech Talk #22
niftycorp
PRO
0
120
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
140
[FlutterKaigi2024] Effective Form 〜Flutterによる複雑なフォーム開発の実践〜
chocoyama
0
3.9k
新規学習のハードルを下げる方法とは?/ How to Make Learning Something New Easier?
nobuoooo
1
120
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
720
大規模サイトリビルドの現場から:成功と失敗のリアルな教訓 / Site Rebuild,Real Lessons Learned from Successes and Failures_JJUG Fall 2024
techtekt
0
190
@nifty天気予報のフロントエンドを 実装するまで - NIFTY Tech Talk #22
niftycorp
PRO
0
120
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
400
Jakarta EE meets AI
ivargrimstad
0
1.2k
初めてDefinitelyTypedにPRを出した話
syumai
0
470
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Designing the Hi-DPI Web
ddemaree
280
34k
Speed Design
sergeychernyshev
25
640
Agile that works and the tools we love
rasmusluckow
327
21k
Adopting Sorbet at Scale
ufuk
73
9.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Docker and Python
trallard
40
3.1k
Making Projects Easy
brettharned
115
5.9k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
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