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
95
Extended A Study in Bitmap: Is NDK the fast Processing method by CPU?
bigbackboom
0
2
Have A Dog in CircleCI
bigbackboom
0
17
Androidエンジニアのお仕事でのショボーン
bigbackboom
0
46
解明!楽しいプレゼンする話すスキル
bigbackboom
0
45
Pay for Businessのgradle.ktsへの移行の小噺
bigbackboom
0
29
A Study in Bitmap: Is NDK the fast Processing method by CPU?
bigbackboom
0
230
Shallow Dip into Kotlin Coroutine
bigbackboom
0
160
Android Architecture Componentの Navigationで少しはまった話
bigbackboom
0
610
Other Decks in Technology
See All in Technology
re:Invent2024 KeynoteのAmazon Q Developer考察
yusukeshimizu
1
150
新卒1年目、はじめてのアプリケーションサーバー【IBM WebSphere Liberty】
ktgrryt
0
130
My small contributions - Fujiwara Tech Conference 2025
ijin
0
1.4k
いま現場PMのあなたが、 経営と向き合うPMになるために 必要なこと、腹をくくること
hiro93n
9
7.7k
Git scrapingで始める継続的なデータ追跡 / Git Scraping
ohbarye
5
500
メンバーがオーナーシップを発揮しやすいチームづくり
ham0215
2
140
【NGK2025S】動物園(PINTO_model_zoo)に遊びに行こう
kazuhitotakahashi
0
240
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
1
360
Building Scalable Backend Services with Firebase
wisdommatt
0
110
【Oracle Cloud ウェビナー】2025年のセキュリティ脅威を読み解く:リスクに備えるためのレジリエンスとデータ保護
oracle4engineer
PRO
1
100
AWSサービスアップデート 2024/12 Part3
nrinetcom
PRO
0
140
Docker Desktop で Docker を始めよう
zembutsu
PRO
0
180
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
335
57k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
210
Making Projects Easy
brettharned
116
6k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
19
2.3k
Git: the NoSQL Database
bkeepers
PRO
427
64k
KATA
mclloyd
29
14k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
BBQ
matthewcrist
85
9.4k
Writing Fast Ruby
sferik
628
61k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
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