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
CoordinatorLayoutのBehaviorを使い倒す
Search
HiroYUKI Seto
December 12, 2019
Technology
1
350
CoordinatorLayoutのBehaviorを使い倒す
19/12/12
DMM Android勉強会 #3
HiroYUKI Seto
December 12, 2019
Tweet
Share
More Decks by HiroYUKI Seto
See All by HiroYUKI Seto
Androidアプリの 安全なリファクタリングを行うパターン集
seto_hi
2
4.9k
UI TestやVisual Regression Testを コスパ良くやる
seto_hi
3
1.8k
事業支援というお仕事
seto_hi
0
400
MDCの内部実装から学ぶ 表現力の高いViewの作り方
seto_hi
5
1.7k
Jetpack Compose
seto_hi
2
720
UI改善に繋がるエンジニアの立ち回り
seto_hi
2
4.6k
MDCのButtonのCorner Family
seto_hi
1
150
MDCのBottomAppBarのShadowの実現方法
seto_hi
0
920
Kyashは なぜ使いやすいのか
seto_hi
1
2.4k
Other Decks in Technology
See All in Technology
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
C++26 エラー性動作
faithandbrave
2
760
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
350
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
540
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.3k
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
210
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
Qiita埋め込み用スライド
naoki_0531
0
5.1k
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
390
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
270
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
490
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
170
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Visualization
eitanlees
146
15k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
KATA
mclloyd
29
14k
Side Projects
sachag
452
42k
The Cost Of JavaScript in 2023
addyosmani
45
7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Making the Leap to Tech Lead
cromwellryan
133
9k
Transcript
$50ࣨށ༏೭ $PPSEJOBUPS-BZPVUͷ #FIBWJPSΛ ͍͢
X © DMM.com w ށ༏೭ w !TFUP@IJ w ݄ೖࣾ w
$50ࣨॴଐ w ʮೖࣾͨ͠Βطʹొஃ͢Δ͜ͱʹͳ͍ͬͯͨʯ ࣗݾհ
X © DMM.com ͍͢
X © DMM.com ͦͷલʹ ࢥ͍ग़͢
X © DMM.com $PPSEJOBUPS-BZPVUΛ༻ҙ͢Δ $PPSEJOBUPS-BZPVUͷࢠ7JFXʹ app:layout_behavior ଐੑΛՃ͢Δ Ҏ্ʂ $PPSEJOBUPS-BZPVU#FIBWJPS
X © DMM.com $PPSEJOBUPS-BZPVU#FIBWJPS
X © DMM.com
X © DMM.com $PPSEJOBUPS-BZPVU#FIBWJPS
X © DMM.com
X © DMM.com $PPSEJOBUPS-BZPVUΛ༻ҙ͢Δ $PPSEJOBUPS-BZPVUͷࢠ7JFXʹ app:layout_behavior ଐੑΛՃ͢Δ Ҏ্ʂ $PPSEJOBUPS-BZPVU#FIBWJPS
X © DMM.com #FIBWJPSͱ
X © DMM.com l*OUFSBDUJPOCFIBWJPSQMVHJOGPSDIJMEWJFXTPG$PPSEJOBUPS-BZPVU "#FIBWJPSJNQMFNFOUTPOFPSNPSFJOUFSBDUJPOTUIBUBVTFSDBO UBLFPOBDIJMEWJFX5IFTFJOUFSBDUJPOTNBZJODMVEFESBHT TXJQFT qJOHT PSBOZPUIFSHFTUVSFTz
$PPSEJOBUPS-BZPVU#FIBWJPS IUUQTEFWFMPQFSBOESPJEDPNSFGFSFODFBOESPJETVQQPSUEFTJHOXJEHFU$PPSEJOBUPS-BZPVU#FIBWJPS
X © DMM.com w ҙͷ7JFXʹ w Կ͔͕ى͖ͨͱ͖ʹ w ࢦఆͨ͠7JFXʹ w
Կ͔Λ͢Δ Ͳ͏͏͔ w layout_behavior Λॻ͍ͨViewͰͳͯ͘Α͍ w %SBH 4XJQF 'MJOH FUD w ͜͜Λ࣮͢Δ w YNMͰBQQlayout_behavior Λॻ͍ͨ7JFX
X © DMM.com ͳͥࠓ
X © DMM.com .%$ʹΑͬͯ ࠓ #FIBWJPS͕͍ʂʂ
X © DMM.com ࡞Δ
X © DMM.com • layoutDependsOn w ҙͷ7JFXͰ͋Δ͔Λฦ͢ • onDependentViewChanged w
ҙͷ7JFXͷϨΠΞτ͕มΘΔͱݺΕΔ • onNestedScroll / onNestedFling w ରͷ7JFX͕4DSPMM'MJOH͞ΕΔͱݺΕΔ େࣄͳϝιου
X © DMM.com αϯϓϧϦϙδτϦ IUUQTHJUIVCDPNIJSPZVLJTFUPCFIBWJPSTBNQMF
X © DMM.com class FabRotationBehavior() : CoordinatorLayout.Behavior<View>() { // xmlͰࢦఆͨ͠ࡍʹݺΕΔίϯετϥΫλ
constructor( context: Context, attrs: AttributeSet ) : this() } ࣮ίϯετϥΫλ
X © DMM.com override fun layoutDependsOn( … ): Boolean {
return dependency is NestedScrollingChild2 } ࣮PO4UBSU/FTUFE4DSPMM
X © DMM.com override fun onStartNestedScroll( … ): Boolean {
//trueΛฦ͢ͱ onNestedScroll ͕ݺΕΔ return true } ࣮PO4UBSU/FTUFE4DSPMM
X © DMM.com override fun onNestedScroll( … dyConsumed: Int …
) { child.rotation += dyConsumed } ࣮PO/FTUFE4DSPMM
X © DMM.com Ͳ͏͏
X © DMM.com w ҙͷ7JFXʹ w layout_behavior Λॻ͍ͨViewͰͳͯ͘Α͍ w Կ͔͕ى͖ͨͱ͖ʹ
w %SBH 4XJQF 'MJOH FUD w ࢦఆͨ͠7JFXʹ w YNMͰBQQlayout_behavior Λॻ͍ͨ7JFX w Կ͔Λ͢Δ w ͜͜Λ࣮͢Δ Ͳ͏͏͔
X © DMM.com w ͕$PPSEJOBUPS-BZPVU ඞਢ w 7JFXͷϝιουΛୟ͚ͩ͘ w
FYWJFXͷSPUBUJPOΛม͑Δ WJTJCJMJUZΛม͑Δ w FY&YUFOEFE'MPBUJOH"DUJPO#VUUPOFYUFOE TISJOL w Ҡಈมܗ͕ͳ͍Ξχϝʔγϣϯ w FY৭ͷมԽɺճసɺ⾩Ͱͳ͍ΞϧϑΝ w 5SBOTGPSNͷྫʜ #FIBWJPSͷ͍Ͳ͜Ζ
X © DMM.com w ͕$PPSEJOBUPS-BZPVUͰͳ͍߹ w Ξχϝʔγϣϯ͕7JFXʹ࣮͞Ε͍ͯͳ͍ w Ҡಈมܗ͕͋Δ߹ #FIBWJPSͰ࣮͢ΔΑΓ5SBOTJUJPOָ͕
w 5SBOTJUJPOͱ࣮ͯ͠ࡁ͞Ε͍ͯΔ w Ҡಈɺมܗɺग़ݱɺফࣦ 5SBOTJUJPOͷํ͕Α͍ͱ͜Ζ
X © DMM.com ͍Ͳ͜ΖΛͬͯ ྑ͍#FIBWJPSϥΠϑΛ
X © DMM.com w ެࣜϦϑΝϨϯε w IUUQTEFWFMPQFSBOESPJEDPNSFGFSFODFBOESPJETVQQPSUEFTJHOXJEHFU $PPSEJOBUPS-BZPVU#FIBWJPS w NBUFSJBMDPNQPOFOUTBOESPJE
w IUUQTHJUIVCDPNNBUFSJBMDPNQPOFOUTNBUFSJBMDPNQPOFOUTBOESPJEUSFF NBTUFSMJCKBWBDPNHPPHMFBOESPJENBUFSJBMUSBOTGPSNBUJPO ࢀߟจݙ
X © DMM.com w %SPJE,BJHJ .%$ͷ෦࣮͔ΒֶͿදݱྗͷߴ͍7JFXͷ࡞Γํ ΦϋφγϋπρΫ