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のBottomAppBarのShadowの実現方法
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
HiroYUKI Seto
January 28, 2019
Technology
1.1k
0
Share
MDCのBottomAppBarのShadowの実現方法
2019/1/28
potatotips #58
HiroYUKI Seto
January 28, 2019
More Decks by HiroYUKI Seto
See All by HiroYUKI Seto
Androidアプリの 安全なリファクタリングを行うパターン集
seto_hi
2
5k
UI TestやVisual Regression Testを コスパ良くやる
seto_hi
3
1.9k
事業支援というお仕事
seto_hi
0
450
MDCの内部実装から学ぶ 表現力の高いViewの作り方
seto_hi
5
1.9k
CoordinatorLayoutのBehaviorを使い倒す
seto_hi
1
450
Jetpack Compose
seto_hi
2
870
UI改善に繋がるエンジニアの立ち回り
seto_hi
2
4.8k
MDCのButtonのCorner Family
seto_hi
1
250
Kyashは なぜ使いやすいのか
seto_hi
1
2.6k
Other Decks in Technology
See All in Technology
プラットフォームエンジニアリングの実践 - AWS コンテナサービスで構築する社内プラットフォーム / AWS Containers Platform Meetup #1
literalice
1
230
コードや知識を組み込む / Incorporate Code and Knowledge
ks91
PRO
0
200
Claude Code を安全に使おう勉強会 / Claude Code Security Basics
masahirokawahara
12
39k
Fabric MCPの紹介と使い分け
ryomaru0825
1
110
20年前の「OSS革命」に学ぶ AI時代の生存戦略
samakada
0
530
20260428_Product Management Summit_Loglass_JoeHirose
loglassjoe
4
6.5k
ServiceNow Knowledge 26 の歩き方
manarobot
0
300
試作とデモンストレーション / Prototyping and Demonstrations
ks91
PRO
0
160
知ってた?JavaScriptの"正しさ"を検証するテストが5万以上もあること(Test262)
riyaamemiya
0
130
EMから幅を広げるために最近挑戦していること / Recent challenges I'm undertaking to expand my horizons beyond EM
hiro_torii
1
180
雑談は、センサーだった
bitkey
PRO
2
160
Building a Study Buddy AI Agent from Scratch: From Passive Chatbots to Autonomous Systems
itchimonji
0
120
Featured
See All Featured
Fireside Chat
paigeccino
42
3.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Design in an AI World
tapps
1
210
Google's AI Overviews - The New Search
badams
0
990
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
110
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
190
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
230
Transcript
גࣜձࣾϊϋφɹށ༏೭ .%$ͷ#PUUPN"QQ#BSͷ 4IBEPXͷ࣮ݱํ๏
ށ༏೭ˏTFUP@IJ גࣜձࣾϊϋφ ΞϓϦΤϯδχΞɺ ϦαʔνɺࢪࡦɺσβΠϯ
None
.BUFSJBM%FTJHO$PNQPOFOUT
#PUUPN"QQ#BS
04͕4IBEPXΛඳը͢Δ݅ w "OESPJEˢ w &MFWBUJPO͕ΑΓେ͖͍ w 7JFXͷ0VUMJOF͕ํܗ • Outline.MODE_ROUND_RECT w
·ͨತਤܗ • Outline.MODE_CONVEX_PATH
#PUUPN"QQ#BS
Ͳ͏ͬͯ ࣮ݱ͞Ε͍ͯΔͷ
#PUUPN"QQ#BS࣮ EdgeTreatment topEdgeTreatment = new BottomAppBarTopEdgeTreatment(…); ShapeAppearanceModel appBarModel = materialShapeDrawable.getShapeAppearanceModel();
appBarModel.setTopEdge(topEdgeTreatment); materialShapeDrawable.setShadowCompatibilityMode( SHADOW_COMPAT_MODE_ALWAYS); … ViewCompat. setBackground(this, materialShapeDrawable);
#PUUPN"QQ#BS5PQ&EHF5SFBUNFOU @Override public void getEdgePath(…) { … shapePath.lineTo(…) shapePath.addArc(…) shapePath.addArc(…)
shapePath.addArc(…) shapePath.lineTo(…) … }
BEE"SD BEE"SD BEE-JOF BEE-JOF #PUUPN"QQ#BS BEE"SD
.BUFSJBM4IBQF%SBXBCMFESBX MaterialShapeDrawable.drawCompatShadow → EdgeShadowOperation.draw → ShadowCompatOperation.draw → ShadowRenderer.drawCornerShadow / ShadowRenderer.drawEdgeShadow
canvas.drawBitmap(shadowLayer, …)
4IBEPX3FOEFSFSESBX$PSOFS4IBEPX … cornerShadowPaint.setShader( new RadialGradient( …, Shader.TileMode.CLAMP)); … canvas.drawArc( …,
cornerShadowPaint); …
4IBEPX3FOEFSFS ΜΓ
None
·ͱΊ w #PUUPN"QQ#BS.BUFSJBM4IBQF%SBXBCMFΛ͏ w .BUFSJBM4IBQF%SBXBCMFͷ5PQ&EHF͕ #PUUPN"QQ#BS5PQ&EHF5SFBUNFOU w #PUUPN"QQ#BS5PQ&EHF5SFBUNFOU BSDͰ͘΅ΈΛදݱ͍ͯ͠Δ w
Өͷඳը4IBEPX3FOEFSFS
None