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
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
580
PHPerのための計算量入門/Complexity101 for PHPer
hanhan1978
5
210
日本版とグローバル版のモバイルアプリ統合の開発の裏側と今後の展望
miichan
1
130
Storage Browser for Amazon S3
miu_crescent
1
240
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
490
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
360
多領域インシデントマネジメントへの挑戦:ハードウェアとソフトウェアの融合が生む課題/Challenge to multidisciplinary incident management: Issues created by the fusion of hardware and software
bitkey
PRO
2
110
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
muziyoshiz
3
2.4k
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
podman_update_2024-12
orimanabu
1
280
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
65
11k
Being A Developer After 40
akosma
87
590k
The Pragmatic Product Professional
lauravandoore
32
6.3k
The Invisible Side of Design
smashingmag
298
50k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
KATA
mclloyd
29
14k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Side Projects
sachag
452
42k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
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