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
170
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.8k
CoordinatorLayoutのBehaviorを使い倒す
seto_hi
1
380
Jetpack Compose
seto_hi
2
750
UI改善に繋がるエンジニアの立ち回り
seto_hi
2
4.6k
MDCのBottomAppBarのShadowの実現方法
seto_hi
0
950
Kyashは なぜ使いやすいのか
seto_hi
1
2.5k
Other Decks in Technology
See All in Technology
製造業の会計システムをDDDで開発した話
caddi_eng
3
940
17年のQA経験が導いたスクラムマスターへの道 / 17 Years in QA to Scrum Master
toma_sm
0
380
移行できそうでやりきれなかった 10年超えのシステムを葬るための戦略
ryu955
2
240
[CATS]Amazon Bedrock GenUハンズオン座学資料 #2 GenU環境でRAGを体験してみよう
tsukuboshi
0
140
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
20k
KCD Brazil '25: Enabling Developers with Dapr & Backstage
salaboy
1
120
大規模プロジェクトにおける 品質管理の要点と実践 / 20250327 Suguru Ishii
shift_evolve
0
280
ISUCONにPHPで挑み続けてできるようになっ(てき)たこと / phperkaigi2025
blue_goheimochi
0
140
パスキー導入の課題と ベストプラクティス、今後の展望
ritou
7
1.2k
新卒エンジニア研修の試行錯誤と工夫/nikkei-tech-talk-31
nishiuma
0
200
LINE Notify互換のボットを作った話
kenichirokimura
0
170
Riverpod & Riverpod Generatorを利用して状態管理部分の処理を書き換えてみる簡単な事例紹介
fumiyasac0921
0
100
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
41
2.6k
How to Ace a Technical Interview
jacobian
276
23k
How STYLIGHT went responsive
nonsquared
99
5.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Documentation Writing (for coders)
carmenintech
69
4.7k
For a Future-Friendly Web
brad_frost
176
9.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
30
1.1k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.4k
4 Signs Your Business is Dying
shpigford
183
22k
The Cult of Friendly URLs
andyhume
78
6.3k
Building an army of robots
kneath
304
45k
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