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
390
MDCの内部実装から学ぶ 表現力の高いViewの作り方
seto_hi
5
1.7k
Jetpack Compose
seto_hi
2
710
UI改善に繋がるエンジニアの立ち回り
seto_hi
2
4.6k
MDCのButtonのCorner Family
seto_hi
1
140
MDCのBottomAppBarのShadowの実現方法
seto_hi
0
910
Kyashは なぜ使いやすいのか
seto_hi
1
2.4k
Other Decks in Technology
See All in Technology
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
130
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
950
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
Engineer Career Talk
lycorp_recruit_jp
0
120
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
170
AGIについてChatGPTに聞いてみた
blueb
0
130
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
210
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
120
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
Featured
See All Featured
Ruby is Unlike a Banana
tanoku
97
11k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Become a Pro
speakerdeck
PRO
25
5k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Designing Experiences People Love
moore
138
23k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
RailsConf 2023
tenderlove
29
900
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ͷ࡞Γํ ΦϋφγϋπρΫ