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
攻撃と防御で学ぶAI時代のプロダクトセキュリティ演習
recruitengineers
PRO
1
320
もう一度考える SRE チームの作り方・育て方 / Rethinking SRE #1: Building and Growing SRE Teams
rrreeeyyy
5
970
AI時代の強いチームの作り方
yuukiyo
23
15k
【CEDEC2026】次世代デジタルカードゲームのサーバー設計と運用 〜『Shadowverse: Worlds Beyond』の舞台裏~
cygames
PRO
0
820
Digitization部 紹介資料
sansan33
PRO
2
7.7k
修正PRを食べてレビュースキルが賢くなる:Claude Codeによる自己改善サイクル
yuyaumetsu
4
1.1k
クラウドセキュリティ入門 ~安全なクラウド利用のための基礎知識~
lhazy
8
7.6k
AIエージェントを前提としたプラットフォーム エンジニアリング:GKEで作るAgent-Ready Golden Path
legalontechnologies
PRO
1
150
タクシーアプリ『GO』の実践的データ活用〜位置情報データの収集とStreamlitでの可視化〜
mot_techtalk
2
200
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
Pavlokで始める電撃駆動開発
sgrsn
0
170
新しい SLO が良い感じにハマっている話
z63d
4
2.1k
Featured
See All Featured
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
240
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
520
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Code Review Best Practice
trishagee
74
20k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
290
Bash Introduction
62gerente
615
220k
Facilitating Awesome Meetings
lara
57
7.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
190
Code Reviewing Like a Champion
maltzj
528
40k
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