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
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
3Dシーンの圧縮
fadis
1
770
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
400
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
160
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.3k
Inside Stream API
skrb
1
710
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
2
650
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
180
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
680
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
4
910
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
170
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
120
net-httpのHTTP/2対応について
naruse
0
480
Featured
See All Featured
Making Projects Easy
brettharned
120
6.7k
From π to Pie charts
rasagy
0
210
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Embracing the Ebb and Flow
colly
88
5.1k
How to Ace a Technical Interview
jacobian
281
24k
Music & Morning Musume
bryan
47
7.2k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Tell your own story through comics
letsgokoyo
1
950
Accessibility Awareness
sabderemane
1
140
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
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. おわり