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
Material Components ことはじめ / Get Started Materia...
Search
Sho Masegi
September 28, 2018
Technology
810
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Material Components ことはじめ / Get Started Material Components
Sho Masegi
September 28, 2018
More Decks by Sho Masegi
See All by Sho Masegi
独自の共通認証基盤を用いているサービスでアカウント削除機能を提供したときの道程
shomasegi
1
3.2k
Migrate Swift 4.2 to 5.2
shomasegi
4
890
今更ながらEpoxy / Lateinit Epoxy
shomasegi
2
900
Other Decks in Technology
See All in Technology
AWS Security Agent といっしょに脅威モデリングをやってみよう
amarelo_n24
1
180
When Platform Engineering Meets GenAI
sucitw
0
130
【Snowflake Summit 2026 Recap!!】Snowflake Summit Deep Dive: Security & Governance
civitaspo
1
270
GitHub Copilot 最新アップデート – 「一歩先」の実践活用術
moulongzhang
5
1.5k
攻撃者視点で考えるDetection Engineering
cryptopeg
3
2k
いまさら聞けない「仕様駆動開発入門」 〜AI活用時代の開発プロセスを考える〜
findy_eventslides
2
160
【セミナー資料】Claude Code をセキュアに使うための考え方と設定の勘どころ / Claude Code Webinar 20260616
masahirokawahara
2
420
コミュニティの有益性 ~JAWS Days 2026 での体験を通して~ / The Benefits of a Community ~Through My Experience at JAWS Days 2026~
seike460
PRO
0
180
エラーバジェットのアラートのタイミングを考える.pdf
kairim0
0
170
[チョークトーク資料]AWS DevOps Agent を使いこなす / AWS Dev Ops Agent Chalk Talk AWS Summit Japan 2026
kinunori
3
560
FPC(フレキシブル)基板にZephyr実装してみた。
iotengineer22
0
120
Lightning近況報告
kozy4324
0
190
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
390
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
430
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Everyday Curiosity
cassininazir
0
230
Agile that works and the tools we love
rasmusluckow
331
21k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
210
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Embracing the Ebb and Flow
colly
88
5.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Transcript
Material Components ͜ͱ͡Ίɹ Sho Masegi
ࣗݾհ • όέπඃͬͯ·͢ɻ • େֶੜͰ͢ɻ • Androidɺ࣌ʑiOS • ॳΊͯͷLT @boc_sho
Material Componentsͱʁ Material DesignΛ࣮ݱ͢ΔͨΊͷUI෦܈ ͷ͜ͱɻ ࠷ۙɺ1.0.0͕ϦϦʔε͞Εͨ
ࠓճ͢͜ͱ - BottomAppBar - Chip
ͬͨ͜ͱ͋Δํ͍·͔͢ʁ
ກΛଓ͚͍ͯͩ͘͞ɻ
Material Components in library - AppBarLayout - Backdrop - Banner
- BottomAppBar - BottomNavigationView - BottomSheetBehavior - BottomSheetDialogFragment - CheckBox - Chip - CollapsingToolbarLayout - DataTable - Dialog - Divider - ExtendedFloatingActionButton - FloatingActionButton - ImageList - List - MaterialButton - MaterialCardView - Menu - NavigationView - ProgressIndicator - RadioButton - SideSheetBehavior - Slider - Snackbar - Switch - TabLayout - TextInputLayout - Tooltip
New Components - AppBarLayout - Backdrop - Banner - BottomAppBar
- BottomNavigationView - BottomSheetBehavior - BottomSheetDialogFragment - CheckBox - Chip - CollapsingToolbarLayout - DataTable - Dialog - Divider - ExtendedFloatingActionButton - FloatingActionButton - ImageList - List - MaterialButton - MaterialCardView - Menu - NavigationView - ProgressIndicator - RadioButton - SideSheetBehavior - Slider - Snackbar - Switch - TabLayout - TextInputLayout - Tooltip
ݱࡏ͑Δͷ…. ( - 1.0.0) - AppBarLayout - Backdrop - Banner
- BottomAppBar - BottomNavigationView - BottomSheetBehavior - BottomSheetDialogFragment - CheckBox - Chip - CollapsingToolbarLayout - DataTable - Dialog - Divider - ExtendedFloatingActionButton - FloatingActionButton - ImageList - List - MaterialButton - MaterialCardView - Menu - NavigationView - ProgressIndicator - RadioButton - SideSheetBehavior - Slider - Snackbar - Switch - TabLayout - TextInputLayout - Tooltip
ݱࡏ͑Δͷ…. - BottomAppBar - Chip - MaterialButton - MaterialCardView -
TextInputLayout
ͬͯΈΑ͏ʂ
४උ allprojets { repositories { google() jcenter() } } build.gradle
४උ dependencies { // . . . implementation ‘com.google.android.material:material:1.0.0’ //
. . . } build.gradle
४උ android { compileSdkVersion 28 defaultConfig { // . .
. build.gradle
४උ ThemeΛ”Theme.MaterialComponents.~”ʹ͑Δ <style name=“AppTheme” parent=“Theme.MaterialComponents.Light.NoActionBar”>
४උ AndroidXʹϦϑΝΫλϦϯά͢Δ Refactor -> Migrate to AndroidX
४උྃʂ
BottomAppBar
BottomAppBar <androidx.coordinatorlayout.widget.CoordinatorLayout > <com.google.android.material.bottomappbar.BottomAppBar . . . app:backgroundTint="@color/colorPrimary" app:fabAlignmentMode="center" app:fabAttached="true"
app:navigationIcon="@drawable/menu"/> <com.google.android.material.floatingactionbutton.FloatingActionButton . . . app:layout_anchor="@id/bottom_app_bar" /> </androidx.coordinatorlayout.widget.CoordinatorLayout>
BottomAppBar <androidx.coordinatorlayout.widget.CoordinatorLayout > <com.google.android.material.bottomappbar.BottomAppBar . . . app:backgroundTint="@color/colorPrimary" app:fabAlignmentMode="center" app:fabAttached="true"
app:navigationIcon="@drawable/menu"/> <com.google.android.material.floatingactionbutton.FloatingActionButton . . . app:layout_anchor="@id/bottom_app_bar" /> </androidx.coordinatorlayout.widget.CoordinatorLayout>
- fabAlignmentMode - fabCradleMargin - fabCradleRoundedCornerRadius - fabCradleVerticalOffset BottomAppBarͷଐੑ
- fabAlignmentMode BottomAppBarͷଐੑ start end
- fabCradleMargin BottomAppBarͷଐੑ default 10dp
- fabCradleRoundedCornerRadius BottomAppBarͷଐੑ default 30dp
- fabCradleVerticalOffset BottomAppBarͷଐੑ default 15dp
Chip
Chip <com.google.android.material.chip.ChipGroup . . . app:chipSpacing="4dp" app:chipSpacingHorizontal="2dp" app:chipSpacingVertival="2dp" app:singleSelection=“true” app:singleLine=“true"/>
<com.google.android.material.chip.Chip . . . /> </com.google.android.material.chip.ChipGroup>
Chip <com.google.android.material.chip.ChipGroup . . . app:chipSpacing="4dp" app:chipSpacingHorizontal="2dp" app:chipSpacingVertival="2dp" app:singleSelection=“true” app:singleLine=“true"/>
<com.google.android.material.chip.Chip . . . /> </com.google.android.material.chip.ChipGroup>
ChipGroup: singleLine false true
Chip val chip = Chip(context) chip.text = "Chip" chip.chipIcon =
ContextCompat.getDrawable(requiredContext(), icon) chip.isCloseIconEnabled = true chip.isCheckable = false chipGroup.addView(chip as View) chip.setOnCloseIconClickListener { chipGroup.removeView(chip as View) } - ChipͷՃํ๏
Chip val chip = Chip(context) chip.text = "Chip" chip.chipIcon =
ContextCompat.getDrawable(requiredContext(), icon) chip.isCloseIconEnabled = true chip.isCheckable = false chip.setOnCloseIconClickListener { chipGroup.removeView(chip as View) } chipGroup.addView(chip as View) - ChipͷՃํ๏
Chip chip.chipIcon = locationIcon chip.isCloseIconEnabled = true chip.setOnCloseIconClickListener { …
} chip.isCheckable = true
MaterialButton MaterialCardView TextInputLayout ʹ͍ͭͯ. . . .
CodelabͰʂ
https:// codelabs.developers.google.com/ codelabs/mdc-101-kotlin/#0
͜Μͳྑ͍ͷΛ༻ҙ͠ ͯ͘ΕΔͳΜͯ. . . .
Google࠷ߴʂ
Android࠷ߴʂ
Material Design Roadmap
Material Design Roadmap
Material Design Roadmap
None