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でViewPagerっぽいの作ろうとして頓死した話
Search
bigbackboom
March 19, 2019
Technology
0
1.5k
RecyclerViewでViewPagerっぽいの作ろうとして頓死した話
bigbackboom
March 19, 2019
Tweet
Share
More Decks by bigbackboom
See All by bigbackboom
Proto Datastoreを使う前の心構え
bigbackboom
0
80
Extended A Study in Bitmap: Is NDK the fast Processing method by CPU?
bigbackboom
0
2
Have A Dog in CircleCI
bigbackboom
0
13
Androidエンジニアのお仕事でのショボーン
bigbackboom
0
44
解明!楽しいプレゼンする話すスキル
bigbackboom
0
42
Pay for Businessのgradle.ktsへの移行の小噺
bigbackboom
0
28
A Study in Bitmap: Is NDK the fast Processing method by CPU?
bigbackboom
0
220
Shallow Dip into Kotlin Coroutine
bigbackboom
0
160
Android Architecture Componentの Navigationで少しはまった話
bigbackboom
0
610
Other Decks in Technology
See All in Technology
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
300
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
180
Wantedly での Datadog 活用事例
bgpat
1
430
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
550
第3回Snowflake女子会_LT登壇資料(合成データ)_Taro_CCCMK
tarotaro0129
0
180
Snowflake女子会#3 Snowpipeの良さを5分で語るよ
lana2548
0
230
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
170
Snykで始めるセキュリティ担当者とSREと開発者が楽になる脆弱性対応 / Getting started with Snyk Vulnerability Response
yamaguchitk333
2
180
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
260
大幅アップデートされたRagas v0.2をキャッチアップ
os1ma
2
520
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
150
Featured
See All Featured
Navigating Team Friction
lara
183
15k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Faster Mobile Websites
deanohume
305
30k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Code Review Best Practice
trishagee
65
17k
Done Done
chrislema
181
16k
Become a Pro
speakerdeck
PRO
26
5k
Fireside Chat
paigeccino
34
3.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Adopting Sorbet at Scale
ufuk
73
9.1k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Transcript
RecyclerViewͰ ViewPagerͬΆ͍ͷ࡞ Ζ͏ͱͯ͠ࢮͨ͠
ࣗݾհ • ໊લɿ٠/bigbackboom • ʢͳΜͪΌͬͯʣAndroid։ൃऀ • ॴଐɿגࣜձࣾΞΠελΠϧ -> CBCloudגࣜձࣾ •
גࣜձࣾΞΠελΠϧͰαʔόʔαΠυ(golang)ͷ։ൃ݉ • ࢦͤʲ;Δͨͬ͘͢ʳ
ViewPagerͱʁ • λϒͷ͋Δը໘ͷ࡞ • λϒλοϓͰͷը໘ભҠ͕Մೳ • εϫΠϓͰͷը໘ͷભҠ͕Մೳ • ॳظબͷը໘ͱࠨӈͷը໘Λ͋Β͔ ͡ΊॳظԽ͕Մೳ
ଞʹʁ • ΧϧʔηϧͳΜ͔࡞ΕΔ • ϫϯεϫΠϓͰҰݸͣͭҠಈ͢ΔΧʔ υ • ࠨӈʹνϥݟͷΧʔυΛஔ͢Δ͜ͱ Մೳ
ͳͥRecyclerViewͰ࡞Δͷʁ • ViewPagerͰΧϧʔηϧ࡞Ζ͏ͱͨ͠ΒҰը໘֎ʹΧʔυΛ ग़͞ͳ͍ͱɺߋ৽͕ը໘ʹදࣔ͞Εͳ͍ঢ়͕ग़ͨɻ • ΧϧʔηϧͷΧʔυআɺը໘֎ʹग़͢ඞཁ͕͋Δɻ
͜ΜͳΧϧʔηϧΛ࡞ͬͨͱ͖
σʔλ͕มߋ͞Εͯɾɾɾ
Ұը໘֎
Α͏͘༰͕มΘΔ
আͷ߹
3Λআʂө͞Εͣ...
Ұը໘֎ʹग़ͯ͠
আ͕ө
ͰRecyclerViewͳΒ • ߋ৽͕ଈ࣌ө • Ϧιʔεͷ༻গͳΊ
ํ • ϫϯεϫΠϓͰɺΧʔυ͕Ұݸಈ͘εϫΠϓΛ࣮ݱ • ແݶͷεΫϩʔϧΛ࣮ݱ͢Δ
Χʔυ͕Ұݸಈ͘εϫΠϓΛ࣮ݱ • PagerSnapΛRecyclerViewʹ͚ͩ͢ͰOK val helper = PagerSnapHelper() helper.attachToRecyclerView(this)
ແݶͷεΫϩʔϧΛ࣮ݱ͢Δ • ͪ͜ΒΛࢀߟʹ͠·ͨ͠ • ϦετΛ3ηοτ༻ҙͯ͠ɺ̎ηοτʹ͋Β͔͡ΊҐஔΛઃఆ ͢Δ • εϫΠϓͰ̎ηοτ͔Β֎ΕΑ͏ͱͨ͠Βɺ2ηοτͷ͍ͣ Ε͔ͷॴʹڧ੍εΫϩʔϧͤ͞Δɻ
None
݁Ռ
why? • ॳظҐஔΛ͏·͍͜ͱઃఆͰ͖ͣɺ Χʔυ͕ਅΜதʹͳΒͳ͍ࣄ͕ଟൃ ͢Δ • εϫΠϓ͢ΔͱมͳҐஔʹͳΔ
େࣦഊ • ݁Ռతʹ࣌ؒͳ͍ʹͰ͖ͦ͏ʹͳ͍ͷͰɺ͜ͷ࣌طଘ࣮Λ ར༻͢Δܗʹ͠·ͨ͠ɻ • ײɿ • ͬͪ·ͬͨͳ͊ • ViewPager͏࣌اըͱͷ༷֬ೝΛগ͠ࡉ͔͘٧ΊΔΑ
͏ʹ͠Α͏ͱࢥͬͨɻ • https:/ /github.com/BigBackBoom/LoopingPagerSnapViewer