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
what's new in Material Design で気になったトピック
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
punchdrunker
May 26, 2023
Programming
650
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
what's new in Material Design で気になったトピック
punchdrunker
May 26, 2023
More Decks by punchdrunker
See All by punchdrunker
Kotlin2.0以降の新機能
punchdrunker
0
48
DnD in Compose
punchdrunker
0
330
7カ国語に対応したサービスでの翻訳管理システムの改善事例
punchdrunker
1
1.5k
Java Bytecode Vertical Tasting
punchdrunker
2
1.6k
getting started with dark theme
punchdrunker
2
1.1k
Practical Activity Transition in Android
punchdrunker
0
1.3k
今時のProgress indicator / Replacing ProgressDialog with ProgressBar
punchdrunker
0
740
レビュー評価4.7の秘密 / The Secret To A Better Reputation
punchdrunker
2
2.1k
Dynamic Feature Modules 入門
punchdrunker
2
2.8k
Other Decks in Programming
See All in Programming
Inside Stream API
skrb
1
710
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
170
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
240
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
130
Lessons from Spec-Driven Development
simas
PRO
0
190
RTSPクライアントを自作してみた話
simotin13
0
600
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
510
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
170
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
4.1k
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
240
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
120
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
190
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
230
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
860
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
230
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
200
How to make the Groovebox
asonas
2
2.2k
WENDY [Excerpt]
tessaabrams
11
38k
Transcript
Google I/O 2023での Material Designまわりの話 @punchdrunker
mixi, Inc. What’s new in Material Design https://io.google/2023/program/630ffaa3-9b3d-4e30-a89f-91ef3e8052cf/intl/ja/
mixi, Inc. Materilal DesignとかMaterial Youとか - Material Design - 2014に発表されたデザインフレームワーク(Lollipopのプレビューが出た頃!!)
- 画面に配置する部品の設計方針などをまとめたガイドライン - ガイドラインに従った実装をサポートするライブラリ群 - 今は最新バージョンのMaterial 3とか M3とか呼ぶ事が多そう - Material You - Google I/O 2021で発表された - Material Desingの枠の中でユーザーに提供されるイイカンジの機能の総称 - アプリアイコンの形を設定で変えられる - 色の具合を設定で変えられる - 壁紙をイイカンジに変えられる
mixi, Inc. Material Design関連の主なライブラリ 従来のView用のライブラリとCompose用のライブラリは分かれているので、調査が若干大変。。。 - Compose Material (Jetpack)
- compose用のMDライブラリ - Compose Material 3(Jetpack) - Material Design 2もあった気がするけど3からパッケージ名が別名 - Material Components Android(非Jetpack) - 昔からあるView用のMDライブラリ - Javaで書かれてる - 別名MDC-AndroidとかMDC - Composeと並行してメンテされてる - Jetpackには入っていない
mixi, Inc.
mixi, Inc.
mixi, Inc. What’s new in Material Designで気になったトピック - Carousel -
RecyclerView用の LayoutManager が追加された - Dynamic Color - Content-based color - これまで壁紙に合わせたColorScheme(色のセット)はあったが、画像リソースや単色を指定して、ColorSchemeを作っ てくれる
mixi, Inc. Carousel 現状はMDCの方でしか実装されていないがComposeでも開発は進んでいる。 カタログアプリで実装されている。 https://github.com/material-components/material-components-android
- RecyclerViewのLayoutManagerとしてCarouselLayoutManagerが追加 - CarouselLayoutManagerにStrategyを渡して見せ型調整 - MultiBrowseCarouselStrategy - なるべく多くのセルを表示 - HeroCarouselStrategy - 1つ1つを強調して表示
mixi, Inc. Dynamic Color - Content-based color 2022くらいから端末の壁紙に合わせたColor schemeを選んでくれる仕組みはあった。(Android12以上)
画像リソースやColor resを渡すと最適なColor schemeを選んでテーマに組み込んでくれる仕組みが追加されるらしい。 https://m3.material.io/styles/color/dynamic-color/overview こちらも現状ではMDCでしか対応されていなさそう。 内部ではMaterial Color Utilityが使われている https://github.com/material-foundation/material-color-utilities - 渡されたbitmapをQuantizeしてScoreクラスで評価するとbaseSeedColorが得られる - baseSeedColorをもとにSchemeContentが作成されて、それをContextに反映してinflate - Pixel 6aで3秒くらい掛かったので、いろんな部品に使いまくるものではなさそう(200kBのpng)
mixi, Inc. 5 Key colors
mixi, Inc. Content-based colorの使い方(Activity) @Override protected void onCreate(Bundle savedInstanceState) {
// Invoke before the view is inflated in your activity. DynamicColors.applyToActivityIfAvailable( this, new DynamicColorsOptions.Builder() .setContentBasedSource(bitmap) // @ColorRes Intも渡せる .build() ); setContentView(R.layout.xyz); }
mixi, Inc. @Override public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle
bundle) { Context context = DynamicColors.wrapContextIfAvailable( requireContext(), new DynamicColorsOptions.Builder() .setContentBasedSource(sourceColor) .build()); return layoutInflater.cloneInContext(context).inflate(R.layout.xyz, viewGroup, false); } Content-based colorの使い方(Fragment/View)
mixi, Inc. Content-based colorの使いどころ UIのどこにコンテンツが存在し、コンテンツに基づくカラーが人の体験を向上させることができるかを考えてみま しょう。独立した画面や画面の一部など、明確に定義されたスペースにあるコンポーネントやコンポーネントのク ラスターを探します。これらのコンポーネントが個人のコンテンツと関連している場合、コンテンツベースの色を 継承する効果的な機会がある可能性があります。
mixi, Inc. Androidアプリエンジニア採用してます https://team.mitene.us/jobs
mixi, Inc. おわり