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
MDCのButtonのCorner Family
Search
HiroYUKI Seto
February 08, 2019
Technology
1
150
MDCのButtonのCorner Family
2019/2/8
null
HiroYUKI Seto
February 08, 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
CoordinatorLayoutのBehaviorを使い倒す
seto_hi
1
350
Jetpack Compose
seto_hi
2
720
UI改善に繋がるエンジニアの立ち回り
seto_hi
2
4.6k
MDCのBottomAppBarのShadowの実現方法
seto_hi
0
920
Kyashは なぜ使いやすいのか
seto_hi
1
2.4k
Other Decks in Technology
See All in Technology
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
130
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
560
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
170
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
490
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
850
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
3
310
2024年にチャレンジしたことを振り返るぞ
mitchan
0
140
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
37
14k
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
170
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
230
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
327
38k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Optimising Largest Contentful Paint
csswizardry
33
3k
A Modern Web Designer's Workflow
chriscoyier
693
190k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Speed Design
sergeychernyshev
25
670
A designer walks into a library…
pauljervisheath
204
24k
It's Worth the Effort
3n
183
28k
Docker and Python
trallard
42
3.1k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Transcript
גࣜձࣾϊϋφɹށ༏೭ .%$ͷ#VUUPOͷ $PSOFS'BNJMZ
ށ༏೭ˏTFUP@IJ גࣜձࣾϊϋφ ΞϓϦΤϯδχΞɺ ϦαʔνɺࢪࡦɺσβΠϯ
None
.BUFSJBM%FTJHO$PNQPOFOUT
#VUUPO • app:shapeAppearance= "@style/ShapeAppearanceOverlay.Cut" • app:cornerRadius="0dp"
#VUUPO • app:shapeAppearance= "@style/ShapeAppearanceOverlay.Cut" • app:cornerRadius="4dp"
#VUUPO • app:shapeAppearance= "@style/ShapeAppearanceOverlay.Cut" • app:cornerRadius="18dp"
#VUUPO • app:shapeAppearance= "@style/ShapeAppearanceOverlay.Cut" • app:cornerRadius="30dp"
#VUUPO • app:shapeAppearance= "@style/ShapeAppearanceOverlay.Cut" • app:cornerRadius="60dp"
#VUUPO • app:shapeAppearance= "@style/ShapeAppearanceOverlay.Cut" • app:cornerRadius="70dp"
#VUUPO • app:shapeAppearance= "@style/ShapeAppearanceOverlay.Cut" • app:cornerRadius="80dp"
#VUUPO • app:shapeAppearance= "@style/ShapeAppearanceOverlay.Cut" • app:cornerRadius="90dp"
#VUUPO • app:shapeAppearance= "@style/ShapeAppearanceOverlay.Cut" • app:cornerRadius=“100dp"
෦࣮
ొਓ • MaterialShapeDrawable • Buttonͷഎܠɺ͍͕ͭ͜ݪҼ • ShapeAppearanceModel • ݟͨΛ࢘ΔϚϯɺ֯ลͷShapePathΛ࡞Δ •
ShapePath • ͲΜͳݟ͔ͨͷΫϥε • ShapeAppearancePathProvider • ShapeAppearanceModelΛPathʹม͢ΔϚϯ
എܠͷඳը MaterialShapeDrawable.draw MaterialShapeDrawable.drawFillShape → MaterialShapeDrawable.drawShape → Canvas.drawRoundRect/Canvas.drawPath CutdrawPath
എܠͷ1BUIͷ࡞ MaterialShapeDrawable.draw MaterialShapeDrawable.calculatePath → MSD.calculatePathForSize → ShapeAppearancePathProvider.calculatePath → ShapeAppearancePathProvider.calculatePath
4IBQF"QQFBSBODF1BUI1SPWJEFSDBMDVMBUF1BUI • setCornerPathAndTransform / setEdgePathAndTransform → ShapePathΛ࡞ • appendCornerPath /appendEdgePath
→ ShapePathΛPathʹม ɹ→ ShapePath.applyToPath ɹɹ→ PathOperation.applyToPath
DPSOFS3BEJVTlEQ
DPSOFS3BEJVTEQ
DPSOFS3BEJVTEQ
$PSOFS'BNJMZ306/%&%
$PSOFS'BNJMZ306/%&% • app:cornerRadius="100dp"
$PSOFS'BNJMZ306/%&% • app:cornerRadius="100dp"
എܠͷඳը MaterialShapeDrawable.draw MaterialShapeDrawable.drawFillShape → MaterialShapeDrawable.drawShape → Canvas.drawRoundRect/Canvas.drawPath
$PSOFS'BNJMZ306/%&% • app:cornerRadius="100dp"
·ͱΊ w $VUͰϦϘϯܕʹͳΔͷҙਤ͍ͯ͠Δ͔ w ˠڪΒ͘ҙਤ͍ͯ͠ͳ͍ w എܠͷඳը w 3PVOEFEˠ3PVOE3FDU
w $VUˠ1BUIΛඳը w 1BUIͷมφΠʔϒ
None