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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
1k
Recap #io25 What's new in Google Play
syarihu
0
170
[DroidKaigi 2024] Android ViewからJetpack Composeへ 〜Jetpack Compose移行のすゝめ〜 / From Android View to Jetpack Compose: A Guide to Migration
syarihu
4
5.4k
[shibuya.apk #46] Composableの枠を超えてアニメーションする / Animation beyond Composable
syarihu
0
180
[shibuya.apk #41] Jetpack Composeでグリッドに柔軟にスペースを入れたい
syarihu
0
3.7k
[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
680
Other Decks in Technology
See All in Technology
Agent × Maestro で始める モバイル E2E 端末準備からテスト実行・結果確認まで
sansantech
PRO
0
240
AI Search (Foundry IQ) におけるRAGデータの準備と配置
ryomaru0825
1
100
AIエージェントに 権限と鍵をどこまで渡すか
nrinetcom
PRO
2
160
kintoneで在庫管理システムを作るときの要件定義・設計ポイント
kai0707
0
190
Oracle Database Security 詳細解説
oracle4engineer
PRO
1
180
なぜAI時代に技術記事を書くのか?どう書くのか? 〜bunの場合〜
kworkdev
PRO
0
1.2k
今から始めるAWS環境の暗号移行 - ポスト量子時代に備える
sato4mi
0
130
Autonomous AI Lakehouse - Live AI Hubから始めるセキュアなAIデータ活用 -
oracle4engineer
PRO
2
180
AI秘書と毎日働くのはもう当たり前。開発以外の業務に足りない機能をどう埋める?
minorun365
PRO
4
2k
「作れる」と「リリースできる」の間にあったもの── PdMを外して見えた、PdMがやるべき仕事/Buildable ≠ Shippable: What Removing the PM Taught Me About the PM’s Job
yappli_developers
0
390
ひとりで始めた AI駆動開発、チームに広げて何が変わったのか
kenichiodo
1
170
"AWSはちょっと苦手"でも大丈夫。AWS Blocks で手軽に作る Flutter のバックエンド #FlutterKaigi
tacck
PRO
0
110
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
How to make the Groovebox
asonas
2
2.5k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
2
970
Done Done
chrislema
187
17k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
320
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Discover your Explorer Soul
emna__ayadi
2
1.3k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
950
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
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 まで
ご清聴ありがとうございました