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
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
7
810
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
1
2.3k
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
220
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
250
SREによる隣接領域への越境とその先の信頼性
shonansurvivors
2
520
The Role of Developer Relations in AI Product Success.
giftojabu1
0
120
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.2k
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
The Invisible Side of Design
smashingmag
298
50k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Unsuck your backbone
ammeep
668
57k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Optimizing for Happiness
mojombo
376
70k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
A Tale of Four Properties
chriscoyier
156
23k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.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