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
Лучшие практики RecyclerView
Search
PavelBo
June 29, 2021
Technology
0
170
Лучшие практики RecyclerView
PavelBo
June 29, 2021
Tweet
Share
Other Decks in Technology
See All in Technology
わたしがセキュアにAWSを使えるわけないじゃん、ムリムリ!(※ムリじゃなかった!?)
cmusudakeisuke
1
510
AI時代のSaaSとETL
shoe116
1
110
Scrumは歪む — 組織設計の原理原則
dashi
0
120
Security Diaries of an Open Source IAM
ahus1
0
210
us-east-1 に障害が起きた時に、 ap-northeast-1 にどんな影響があるか 説明できるようになろう!
miu_crescent
PRO
13
4.2k
「Blue Team Labs Online」入門 - みんなで挑むログ解析バトル
v_avenger
0
150
楽しく学ぼう!ネットワーク入門
shotashiratori
3
2.9k
タスク管理も1on1も、もう「管理」じゃない ― KiroとBedrock AgentCoreで変わった"判断の仕事"
yusukeshimizu
5
2.6k
新職業『オーケストレーター』誕生 — エージェント10体を同時に回すAgentOps
gunta
4
1.8k
IBM Bobを使って、PostgreSQLのToDoアプリをDb2へ変換してみよう/202603_Dojo_Bob
mayumihirano
1
320
「ストレッチゾーンに挑戦し続ける」ことって難しくないですか? メンバーの持続的成長を支えるEMの環境設計
sansantech
PRO
3
640
決済サービスを支えるElastic Cloud - Elastic Cloudの導入と推進、決済サービスのObservability
suzukij
2
600
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
140
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
110
Bash Introduction
62gerente
615
210k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
380
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.8k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
130
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
170
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
200
Transcript
Павел Борзиков 29.06.2021 Android Developer Которые вам стоит знать. ЛУЧШИЕ
ПРАКТИКИ RecyclerView
2 Начал разрабатывать под Андроид в 2014 году в Краснодарском
стартапе. Участвовал в разработке банковского приложения, позднее в сервисе доставки еды, сейчас стараюсь делать лучше жизнь пользователей Авито. ▶ Telegram: @elvisfromsouth Павел Борзиков Android Developer
3 Что будем делать?
4 Groupie > Groupie is a simple, flexible library for
complex RecyclerView layouts. val groupAdapter = GroupieAdapter() groupAdapter += CardItem() groupAdapter += TitleItem() recyclerView.adapter = groupAdapter https://github.com/lisawray/ groupie
5 Adapter Delegates > The idea of this library is
to build your adapters by composing reusable components. recyclerView.adapter = ListDelegationAdapter<List<Animal >> ( catAdapterDelegate( ... ), dogAdapterDelegate(), snakeAdapterDelegate() ) https://github.com/sockeqwe/ AdapterDelegates
6 Fingerprint RecyclerView Adapter Fingerprint Fingerprint Fingerprint
7 Fingerprint RecyclerView Adapter onCreateViewHolder? Fingerprint Fingerprint Fingerprint
8 Fingerprint RecyclerView Adapter onCreateViewHolder? Fingerprint Fingerprint Fingerprint Finding Fingerprint
9 Fingerprint RecyclerView Adapter onCreateViewHolder? Fingerprint Fingerprint Fingerprint
10 Переиспользование элемента
11 Переиспользование элемента
12 GroupVerticalItemDecoration Outer Divider Outer Divider Inner Divider Inner Divider
13 Расстановка отступов
14 Расстановка отступов
15 Расстановка отступов
16 Как починить «моргание» элемента? Удалить дефолтный ItemAnimator 01. Payload
02. ? ?
17 Как починить «моргание» элемента? Удалить дефолтный ItemAnimator 01. Payload
02. ?
18 Как починить «моргание» элемента? Удалить дефолтный ItemAnimator 01. Payload
02.
19 Как починить «моргание» элемента? Удалить дефолтный ItemAnimator 01. Payload
02.
20 ConcatAdapter GreenAdapter BlueAdapter RedAdapter
21 ConcatAdapter GreenAdapter BlueAdapter RedAdapter ConcatAdapter ( ) GreenAdapter BlueAdapter
RedAdapter
22 ConcatAdapter GreenAdapter BlueAdapter RedAdapter ConcatAdapter ( ) GreenAdapter BlueAdapter
RedAdapter
23 ConcatAdapter GreenAdapter BlueAdapter RedAdapter ConcatAdapter ( ) GreenAdapter BlueAdapter
RedAdapter
24 Item Life Cycle
25 Item Life Cycle Scroll
26 Item Life Cycle Scroll Scrap View
27 Item Life Cycle Scroll Scrap View Recycled Views
28 Item Life Cycle Scroll Scrap View Recycled Views Dirty
View
29 Item Life Cycle Scroll Scrap View Recycled Views Dirty
View Binding
30 Item Life Cycle Scroll Scrap View Recycled Views Dirty
View Attach Binding
31 Item Life Cycle Scroll Scrap View Recycled Views Dirty
View Attach Binding ViewPool
32 ViewPools View Pool View Pool View Pool
33 ViewPools View Pool
https://github.com/elvisfromsouth/ RecyclerViewTipsAndTricks Спасибо за внимание