Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
RecyclerViewにリストカードを表示する
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
syarihu
January 11, 2018
Technology
1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RecyclerViewにリストカードを表示する
RecyclerViewにリストカードを表示するViewを作成したお話です。
syarihu
January 11, 2018
More Decks by syarihu
See All by syarihu
[DroidKaigi 2026] Making UI specifications visible: Android UI development in the AI agent era supported by Compose Screenshot Testing and galleries
syarihu
0
830
Recap #io25 What's new in Google Play
syarihu
0
160
[DroidKaigi 2024] Android ViewからJetpack Composeへ 〜Jetpack Compose移行のすゝめ〜 / From Android View to Jetpack Compose: A Guide to Migration
syarihu
4
5.3k
[shibuya.apk #46] Composableの枠を超えてアニメーションする / Animation beyond Composable
syarihu
0
160
[shibuya.apk #41] Jetpack Composeでグリッドに柔軟にスペースを入れたい
syarihu
0
3.6k
[DroidKaigi 2022] 詳解Google Playの新しい定期購入 ~オファーの活用や実装例を添えて~
syarihu
0
4k
5分で分かるGoogle Playの新しいサブスクリプション / Google Play new subscription 2022
syarihu
1
2k
[DroidKaigi 2021] Google Play 定期購入 比例配分モード完全攻略ガイド / Google Play Subscription Proration Mode Complete Guide
syarihu
1
8.2k
[Money Forward Tech Drive] What's new in Google Play [Recap #io21]
syarihu
0
670
Other Decks in Technology
See All in Technology
契約書画像からの情報抽出に特化した視覚接地モデルを育てる話
sansantech
PRO
1
160
Cognition AI Japan - ウェビナー2_テストQA_運用監視
cogakira
0
120
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
670
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
780
12 個 Tool と、 4,096 Token
hlum
0
110
不可逆な意思決定を避けながら10億超の顧客データを AI Ready にするデータ基盤設計
baseballyama
1
250
メルペイ 会計システム概要と歴史
mewuto
0
200
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
320
AI時代のPRレビューにどう向き合うか?
kairim0
1
130
検証フェーズはAIの回答を判断するための学習機会
toru_kubota
2
560
購入ドメインでの課題と取り組み
ykagano
0
190
使いこなすために知っておきたい Azure SRE Agent アンチパターン
torumakabe
2
430
Featured
See All Featured
Building Adaptive Systems
keathley
44
3.2k
Ruling the World: When Life Gets Gamed
codingconduct
0
390
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
450
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
260
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
680
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
420
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Color Theory Basics | Prateek | Gurzu
gurzu
1
480
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Transcript
RecyclerViewに リストカードを 表示する shibuya.apk #21 2018/01/11 (Thu) @syarihu
Taichi Sato (@syarihu) • Money Forward, Inc. ◦ Android Engineer
• TechBooster
TechBooster
本題
ことの発端
これどうやって作るんだろう
考えたこと • ViewGroupにaddViewする • ListViewをスクロールさせなくし て使う
ViewGroupにaddViewする • 実装したいと思ったときに これを毎回やるのつらそう • 汎用的に使えない
ListViewをスクロール させなくして使う • ViewGroupにaddViewするより は汎用的に使えそう • 必要のない機能までついてくるの で、なんだか微妙
もっと良い感じにできないだろうか
自分で作ってみよう
カスタムビューを 作ってみる
最低限欲しい機能 • Viewを使いまわしたい ◦ リストアイテムのViewを生成・保持 • 簡単にアイテムを操作したい ◦ リストアイテムの追加・変更・削除 •
もっと見るしたい ◦ リストアイテムの表示数を制限
基礎となるViewを作る
基礎となるViewを作る
Adapterを作る
リストアイテムのViewを 生成・保持する
リストアイテムのViewを 生成・保持する
リストアイテムのViewを 生成・保持する
リストの変更をViewに反映する
リストの変更をViewに反映する • このObservableはRxJavaやDataBindingのObservableではな く、android.database.Observable
リストの変更をViewに反映する • このObservableはRxJavaやDataBindingのObservableではな く、android.database.Observable • RecyclerViewで利用されているものと同じ
リストの変更をViewに反映する
リストの変更をViewに反映する
リストの変更をViewに反映する
リストの変更をViewに反映する
リストアイテムの表示数を 制限する
リストアイテムの表示数を 制限する
リストアイテムの表示数を 制限する
リストアイテムの表示数を 制限する
リストアイテムの表示数を 制限する
xmlから属性を 変更できるようにする
xmlから属性を 変更できるようにする
xmlから属性を 変更できるようにする
サンプルコード
RecyclerListViewの Adapterを作る
RecyclerListViewの Adapterを作る
RecyclerListViewの Adapterを作る
RecyclerListViewの Adapterを作る
RecyclerViewの Adapterを実装する
実行する
None
None
せっかく作ったので
ライブラリ化してみた
RecyclerListView • syarihu/RecyclerListView https://github.com/syarihu/RecyclerLi stView
RecyclerListView net.syarihu.android.library:RecyclerListView:0.1.0
宣伝
None
DroidKaigi 2018 • Android WearのWatch Faceを 作ろう 〜時計の盤面に小さな情 報を添えて〜 ◦
2018/02/09 17:40-18:10 ◦ Room 5
家計簿アプリ『マネーフォワード』の Androidアプリエンジニア募集中! ご興味があれば @syarihu まで
ご清聴ありがとうございました