Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
MDCのBottomAppBarのShadowの実現方法
Search
HiroYUKI Seto
January 28, 2019
Technology
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
2k
事業支援というお仕事
seto_hi
0
470
MDCの内部実装から学ぶ 表現力の高いViewの作り方
seto_hi
5
1.9k
CoordinatorLayoutのBehaviorを使い倒す
seto_hi
1
480
Jetpack Compose
seto_hi
2
900
UI改善に繋がるエンジニアの立ち回り
seto_hi
2
4.9k
MDCのButtonのCorner Family
seto_hi
1
270
Kyashは なぜ使いやすいのか
seto_hi
1
2.7k
Other Decks in Technology
See All in Technology
GitHub、使う?使わない?
happysamurai294
0
120
Vibe-to-Spec開発_実践ガイド
happysamurai294
0
130
AI AgentによるEmbedded SREの取り組み
tgidgd
1
270
Microsoft のサポート ライフサイクルを理解する
murachiakira
PRO
0
240
Adversary Infrastructure Hunting101
disconinja
0
180
ポケモン対戦を自動で記録して振り返ろう
fufufukakaka
0
420
Jev の中身は50行で再現できる。でも本物との差はどこにあるのか
hisuzuya
0
220
E2Eってつらくないですか?E2Eの管理コストを下げる手段とその実践
akaboshinit
6
2.8k
Deep Data Security 機能解説
oracle4engineer
PRO
3
970
1週間、Opus封印でお願いします
kintotechdev
0
400
You Have Agency(サンキュー、Ruby)
snoozer05
PRO
4
620
cdk deployとcdkd deploy、実際にデプロイして5倍速近くの差を実測した
yama3133
1
130
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
KATA
mclloyd
PRO
35
16k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Test your architecture with Archunit
thirion
2
2.5k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
340
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Context Engineering - Making Every Token Count
addyosmani
9
1.3k
Exploring anti-patterns in Rails
aemeredith
4
550
So, you think you're a good person
axbom
PRO
2
2.2k
How to build a perfect <img>
jonoalderson
1
6.2k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
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