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
Androdアプリ開発におけるネストスクロール問題と向き合うの説明用途~NestedScrol...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Swimmy
December 24, 2023
2.9k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Androdアプリ開発におけるネストスクロール問題と向き合うの説明用途~NestedScrollInteropConnectionは何してるの?編~
Swimmy
December 24, 2023
More Decks by Swimmy
See All by Swimmy
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
240
違いがワカルKotlinプログラマーへの道
reoandroider
0
160
違いのワカル Kotlinプログラマーへの道
reoandroider
0
260
[Jetpack Compose] 原理から見るSkippable対応
reoandroider
1
370
Androdアプリ開発におけるネストスクロール問題と向き合うの説明用途
reoandroider
0
3.4k
Androdアプリ開発におけるネストスクロール問題と向き合うの説明用途
reoandroider
0
3.2k
Roborazziを最大限に活用する(導入編)
reoandroider
0
360
Master of NestedScroll
reoandroider
0
16k
Jetpack_Composeで_半円のプログレスバーを作った話
reoandroider
0
460
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
230
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
The Spectacular Lies of Maps
axbom
PRO
1
840
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
620
Producing Creativity
orderedlist
PRO
348
40k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
350
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Designing Experiences People Love
moore
143
24k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
250
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Transcript
相互運用上の注意点 NestedScrollInteropConnectionは何をしているのか? internal class NestedScrollInteropConnection(...) : NestedScrollConnection() { private val
nestedScrollChildHelper = NestedScrollingChildHelper(...) ... override fun onPreScroll(...): Offset { if(nestedScrollChildHelper.startNestedScroll(...)) { ... nestedScrollChildHelper.dispatchNestedScroll(...) return toOffset(consumedScrollCache, available) } }
相互運用上の注意点 NestedScrollConnectionを実装 internal class NestedScrollInteropConnection(...) : NestedScrollConnection() { private val
nestedScrollChildHelper = NestedScrollingChildHelper(...) ... override fun onPreScroll(...): Offset { if(nestedScrollChildHelper.startNestedScroll(...)) { ... nestedScrollChildHelper.dispatchNestedScroll(...) return toOffset(consumedScrollCache, available) } }
相互運用上の注意点 AndroidView同様にHelperクラスを介する internal class NestedScrollInteropConnection(...) : NestedScrollConnection() { private val
nestedScrollChildHelper = NestedScrollingChildHelper(...) ... override fun onPreScroll(...): Offset { if(nestedScrollChildHelper.startNestedScroll(...)) { ... nestedScrollChildHelper.dispatchNestedScroll(...) return toOffset(consumedScrollCache, available) } }
相互運用上の注意点 スクロールする前の制御 internal class NestedScrollInteropConnection(...) : NestedScrollConnection() { private val
nestedScrollChildHelper = NestedScrollingChildHelper(...) ... override fun onPreScroll(...): Offset { if(nestedScrollChildHelper.startNestedScroll(...)) { ... nestedScrollChildHelper.dispatchNestedScroll(...) return toOffset(consumedScrollCache, available) } }
相互運用上の注意点 ネストスクロールができるか確認 internal class NestedScrollInteropConnection(...) : NestedScrollConnection() { private val
nestedScrollChildHelper = NestedScrollingChildHelper(...) ... override fun onPreScroll(...): Offset { if(nestedScrollChildHelper.startNestedScroll(...)) { ... nestedScrollChildHelper.dispatchNestedScroll(...) return toOffset(consumedScrollCache, available) } }
相互運用上の注意点 親にスクロール消費量を送る internal class NestedScrollInteropConnection(...) : NestedScrollConnection() { private val
nestedScrollChildHelper = NestedScrollingChildHelper(...) ... override fun onPreScroll(...): Offset { if(nestedScrollChildHelper.startNestedScroll(...)) { ... nestedScrollChildHelper.dispatchNestedScroll(...) return toOffset(consumedScrollCache, available) } }
相互運用上の注意点 スクロール消費量と消費されなかった量を送る internal class NestedScrollInteropConnection(...) : NestedScrollConnection() { private val
nestedScrollChildHelper = NestedScrollingChildHelper(...) ... override fun onPreScroll(...): Offset { if(nestedScrollChildHelper.startNestedScroll(...)) { ... nestedScrollChildHelper.dispatchNestedScroll( composeToViewOffset(consumed.x), composeToViewOffset(consumed.y), composeToViewOffset(available.x), composeToViewOffset(available.y), ... )