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
CustomCopを使ってMongoidのコーディングルールを整えてみた
jinoketani
0
220
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
190
podman_update_2024-12
orimanabu
1
260
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
120
Storage Browser for Amazon S3
miu_crescent
1
130
非機能品質を作り込むための実践アーキテクチャ
knih
3
730
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
530
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
160
Snowflake女子会#3 Snowpipeの良さを5分で語るよ
lana2548
0
220
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
150
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
150
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
1
110
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Visualization
eitanlees
146
15k
Optimising Largest Contentful Paint
csswizardry
33
3k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Automating Front-end Workflow
addyosmani
1366
200k
How STYLIGHT went responsive
nonsquared
95
5.2k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
RailsConf 2023
tenderlove
29
940
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
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ͷ࡞Γํ ΦϋφγϋπρΫ