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.4k
RecyclerViewでViewPagerっぽいの作ろうとして頓死した話
bigbackboom
March 19, 2019
Tweet
Share
More Decks by bigbackboom
See All by bigbackboom
Proto Datastoreを使う前の心構え
bigbackboom
0
71
Extended A Study in Bitmap: Is NDK the fast Processing method by CPU?
bigbackboom
0
1
Have A Dog in CircleCI
bigbackboom
0
8
Androidエンジニアのお仕事でのショボーン
bigbackboom
0
42
解明!楽しいプレゼンする話すスキル
bigbackboom
0
37
Pay for Businessのgradle.ktsへの移行の小噺
bigbackboom
0
24
A Study in Bitmap: Is NDK the fast Processing method by CPU?
bigbackboom
0
210
Shallow Dip into Kotlin Coroutine
bigbackboom
0
150
Android Architecture Componentの Navigationで少しはまった話
bigbackboom
0
600
Other Decks in Technology
See All in Technology
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
6
660
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
140
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
4
230
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
150
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
330
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
900
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
390
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
700
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
630
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
900
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Bash Introduction
62gerente
608
210k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Making Projects Easy
brettharned
115
5.9k
Producing Creativity
orderedlist
PRO
341
39k
The Invisible Side of Design
smashingmag
298
50k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
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