SlideShare a Scribd company logo
1 of 36
Material Design Components
Material Theming
Subir Chakraborty
Harin Trivedi
Useful for Android + iOS + Web
MDC
Material Design
Components
Components
BottomAppBar
Bottom NavigationBottomSheet
Chips
Collapsing Toolbar Floating Action Button
Material ButtonMaterial Card
Modal Bottom SheetNavigation Views
Snackbars
Tab layout
Text Fields
Top App Bars
Material Card
MaterialCardView is a customizable
component based on CardView from the
Android Support Library. MaterialCardView
provides all of the features of CardView, but
adds attributes for customizing the stroke
and uses an updated Material style by
default.
https://material.io/develop/android/compo
nents/material-card-view/
Material Button
Material Button is a customizable button
component with updated visual styles.
Raised button: A rectangular material
button that lifts and displays ink reactions
on press
Unelevated button: A button made of ink
that displays ink reactions on press but
does not lift
Styles
Filled, elevated button (default):
The default style represents an elevated button with a
colored background. This should be used for important,
final actions, like ‘Save’ or ‘Confirm’.
style="@style/Widget.MaterialComponents.Button"
Styles
Filled, unelevated button
The UnelevatedButton style represents an unelevated
button with a colored background.
style="@style/Widget.MaterialComponents.Button.
UnelevatedButton"
Styles
Text button
The TextButton style has a transparent background with
colored text. Text buttons are used for low-priority actions,
especially when presenting multiple options.
style="@style/Widget.MaterialComponents.Button.
TextButton"
Floating Action Buttons
A FloatingActionButton displays the
primary action in an application. It is a
round icon button that’s elevated above
other page content.
The updated Material FloatingAction
Button style consists of updated
elevation, ripple, and motion changes.
https://material.io/develop/android/comp
onents/floating-action-button/
Visibility
Use the show and hide methods to
animate the visibility of a
FloatingActionButton. The show
animation grows the widget and fades it
in, while the hide animation shrinks the
widget and fades it out.
Bottom App Barss
BottomAppBar puts more
focus on features, increases
engagement, and visually
anchors the UI.
https://material.io/develop/andr
oid/components/bottom-app-
bar/
BottomAppBar Attributes
The placement of the FAB can be controlled by:
fabAlignmentMode
fabAttached
fabCradleMargin
fabCradleRoundedCornerRadius
fabCradleVerticalOffset.
Handling Menu Option
2 ways to handle menu
options:
1.setOnMenuItemClickListener
(OnMenuItemClickListener)
2. setSupportActionBar() on
the BottomAppBar. Handle
navigation item click by
checking if menu item id is
android.R.id.home.
Text Fields
s
TextInputLayout provides an implementation for Material
text fields. Used in conjunction with a TextInputEditText,
TextInputLayout makes it easy to include Material text
fields in your layouts.
https://material.io/develop/android/components/text-input-
layout/
Material Styles
Filled Box (Default)
Filled text fields have a solid
background color and draw
more attention. Apply the
following style to your
TextInputLayout
style="@style/Widget.Material
Components.TextInputLayout.
FilledBox"
Material Styles
Outline Box
Outline text fields have a stroked
border. Apply the following style
to your TextInputLayout
style="@style/Widget.MaterialCo
mponents.TextInputLayout.
OutlineBox"
Style Variations
1.Standard
2.Dense
In order to reduce the height of a text box, you can use a dense
style, which will reduce the vertical padding within the text box.
style="@style/Widget.MaterialComponents.TextInputLayout.
FilledBox.Dense"
style="@style/Widget.MaterialComponents.TextInputLayout.
OutlineBox.Dense"
Snackbars
The Snackbar disappear
automatically, either after a
timeout or after a user interaction
elsewhere on the screen, and can
also be swiped off the screen.
Snackbars can also offer the ability
to perform an action, such as
undoing an action that was just
taken, or retrying an action that
had failed.
https://material.io/develop/android
/components/snackbar/
Usage
Snackbars work best if they are
displayed inside of a
CoordinatorLayout.
CoordinatorLayout allows the
snackbar to enable behavior like
swipe-to-dismiss, as well as
automatically moving widgets
like FloatingActionButton.
Chips
A Chip represents a complex entity in a small block, such
as a contact. It is a rounded button that consists of a label,
an optional chip icon, and an optional close icon. A chip
can either be clicked or toggled if it is checkable.
https://material.io/develop/android/components/chip/
Entry Chips Filter Chips
Action ChipsChoice Chips
ChipLayout
Demo : https://github.com/SubirZ/MaterialComponents
Material
Theming
What & Why?
Material Theming is the
ability to systematically
customize Material Design
to better reflect your
product’s brand
Material Theming consists
of three main actions:
customizing your theme,
applying it across your
design mocks, and using it
in code
UI - Color - Typography
Color
Theming
All Material Design components use a
Widget.MaterialComponents style, and
these styles reference color attributes
from the Material Design theme
(Theme.MaterialComponents).
Vision
In a future update, our themes and components will be
updated to reference a new set of color theming
attributes. Then, all you need to do is update the color
values for these attributes and you can:
➔ Adjust your component colors
➔ Switch between dark and light
themes
➔ Ensure accessible color
combinations across your app
Typography
TextAppearance Styles includes:
● Font face name and weight
● Font size
● Letter spacing
● Text transformation
Shape Theming
The shape library provides a
MaterialShapeDrawable class that can
draw custom shapes, draws itself using
a path generator to easily building new
shapes:
❏ CutCornerTreatment
❏ RoundedCornerTreatment
❏ TriangleEdgeTreatment
How to Integrate?
Android:
compileSdkVersion 'android-P' or 28
(Legacy) implementation 'com.android.support:design:28.0.0-alpha3'
(AndroidX) implementation 'com.google.android.material:material:1.0.0-alpha1'
iOS:
pod 'MaterialComponents’ (All-in-one)
pod 'MaterialComponents/Buttons' or pod 'MaterialComponents/TextFields'
References:
1. https://material.io/design/material-
theming/overview.html#material-theming
2. https://material.io/collections/developer-tutorials/
(Includes codelabs for Android & iOS)
3. https://material.io/develop/android/
4. https://material.io/develop/ios/
5. https://github.com/material-components
Thank
You ;)
https://github.com/HarinTrivedi (Harry’s Lab)
https://github.com/SubirZ/

More Related Content

What's hot

Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesAhsanul Karim
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
How to create ui using droid draw
How to create ui using droid drawHow to create ui using droid draw
How to create ui using droid drawinfo_zybotech
 
Android MapView and MapActivity
Android MapView and MapActivityAndroid MapView and MapActivity
Android MapView and MapActivityAhsanul Karim
 
Multiple Activity and Navigation Primer
Multiple Activity and Navigation PrimerMultiple Activity and Navigation Primer
Multiple Activity and Navigation PrimerAhsanul Karim
 
Android App Development 03 : Widget & UI
Android App Development 03 : Widget & UIAndroid App Development 03 : Widget & UI
Android App Development 03 : Widget & UIAnuchit Chalothorn
 
Chapter 2 — Program and Graphical User Interface Design
Chapter 2 — Program and Graphical User Interface DesignChapter 2 — Program and Graphical User Interface Design
Chapter 2 — Program and Graphical User Interface Designfrancopw
 
How to build accessible UI components
How to build accessible UI componentsHow to build accessible UI components
How to build accessible UI componentsRuss Weakley
 
View groups containers
View groups containersView groups containers
View groups containersMani Selvaraj
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsAhsanul Karim
 
The ms visual basic 6
The ms visual basic 6The ms visual basic 6
The ms visual basic 6Eyelean xilef
 
What is ui element in i phone developmetn
What is ui element in i phone developmetnWhat is ui element in i phone developmetn
What is ui element in i phone developmetnTOPS Technologies
 
Creating accessible modals and autocompletes
Creating accessible modals and autocompletesCreating accessible modals and autocompletes
Creating accessible modals and autocompletesRuss Weakley
 
Visual Basic menu
Visual Basic menuVisual Basic menu
Visual Basic menukuldeep94
 
Day 4: Android: UI Widgets
Day 4: Android: UI WidgetsDay 4: Android: UI Widgets
Day 4: Android: UI WidgetsAhsanul Karim
 

What's hot (20)

Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through Activities
 
01 08 - graphical user interface - layouts
01  08 - graphical user interface - layouts01  08 - graphical user interface - layouts
01 08 - graphical user interface - layouts
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
How to create ui using droid draw
How to create ui using droid drawHow to create ui using droid draw
How to create ui using droid draw
 
Android MapView and MapActivity
Android MapView and MapActivityAndroid MapView and MapActivity
Android MapView and MapActivity
 
Multiple Activity and Navigation Primer
Multiple Activity and Navigation PrimerMultiple Activity and Navigation Primer
Multiple Activity and Navigation Primer
 
Android App Development 03 : Widget & UI
Android App Development 03 : Widget & UIAndroid App Development 03 : Widget & UI
Android App Development 03 : Widget & UI
 
iOS UI best practices
iOS UI best practicesiOS UI best practices
iOS UI best practices
 
Chapter 2 — Program and Graphical User Interface Design
Chapter 2 — Program and Graphical User Interface DesignChapter 2 — Program and Graphical User Interface Design
Chapter 2 — Program and Graphical User Interface Design
 
Create New Android Layout
Create New Android LayoutCreate New Android Layout
Create New Android Layout
 
Ppt lesson 03
Ppt lesson 03Ppt lesson 03
Ppt lesson 03
 
How to build accessible UI components
How to build accessible UI componentsHow to build accessible UI components
How to build accessible UI components
 
View groups containers
View groups containersView groups containers
View groups containers
 
Create New Android Activity
Create New Android ActivityCreate New Android Activity
Create New Android Activity
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
 
The ms visual basic 6
The ms visual basic 6The ms visual basic 6
The ms visual basic 6
 
What is ui element in i phone developmetn
What is ui element in i phone developmetnWhat is ui element in i phone developmetn
What is ui element in i phone developmetn
 
Creating accessible modals and autocompletes
Creating accessible modals and autocompletesCreating accessible modals and autocompletes
Creating accessible modals and autocompletes
 
Visual Basic menu
Visual Basic menuVisual Basic menu
Visual Basic menu
 
Day 4: Android: UI Widgets
Day 4: Android: UI WidgetsDay 4: Android: UI Widgets
Day 4: Android: UI Widgets
 

Similar to MDC - Material Design Components & Theming

AppBar Class In Flutter.pptx
AppBar Class In Flutter.pptxAppBar Class In Flutter.pptx
AppBar Class In Flutter.pptxBOSC Tech Labs
 
App design guide
App design guideApp design guide
App design guideJintin Lin
 
Visual basic concepts
Visual basic conceptsVisual basic concepts
Visual basic conceptsmelody77776
 
Top Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsTop Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsMotorola Mobility - MOTODEV
 
Android Application Development - Level 1
Android Application Development - Level 1Android Application Development - Level 1
Android Application Development - Level 1Isham Rashik
 
Component interface
Component interfaceComponent interface
Component interfaceJAYAARC
 
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAndroid User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAhsanul Karim
 
VB6_INTRODUCTION.ppt
VB6_INTRODUCTION.pptVB6_INTRODUCTION.ppt
VB6_INTRODUCTION.pptBhuvanaR13
 
intro_gui
intro_guiintro_gui
intro_guifilipb2
 
What’s new in XAML and Tooling for Windows 8.1
What’s new in XAML and Tooling for Windows 8.1What’s new in XAML and Tooling for Windows 8.1
What’s new in XAML and Tooling for Windows 8.1Fons Sonnemans
 

Similar to MDC - Material Design Components & Theming (20)

Android Material Design
Android Material DesignAndroid Material Design
Android Material Design
 
AppBar Class In Flutter.pptx
AppBar Class In Flutter.pptxAppBar Class In Flutter.pptx
AppBar Class In Flutter.pptx
 
App design guide
App design guideApp design guide
App design guide
 
Toolbar
ToolbarToolbar
Toolbar
 
Diving deep in compose.pdf
Diving deep in compose.pdfDiving deep in compose.pdf
Diving deep in compose.pdf
 
Visual basic concepts
Visual basic conceptsVisual basic concepts
Visual basic concepts
 
Top Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsTop Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on Tablets
 
Material design
Material designMaterial design
Material design
 
Android Application Development - Level 1
Android Application Development - Level 1Android Application Development - Level 1
Android Application Development - Level 1
 
Introduction to flutter
Introduction to flutter Introduction to flutter
Introduction to flutter
 
Visual Basic.pptx
Visual Basic.pptxVisual Basic.pptx
Visual Basic.pptx
 
Visual Programming
Visual ProgrammingVisual Programming
Visual Programming
 
Visual basic
Visual basicVisual basic
Visual basic
 
Fms Web Cms Training
Fms Web Cms TrainingFms Web Cms Training
Fms Web Cms Training
 
Component interface
Component interfaceComponent interface
Component interface
 
Ap quiz app
Ap quiz appAp quiz app
Ap quiz app
 
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAndroid User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
 
VB6_INTRODUCTION.ppt
VB6_INTRODUCTION.pptVB6_INTRODUCTION.ppt
VB6_INTRODUCTION.ppt
 
intro_gui
intro_guiintro_gui
intro_gui
 
What’s new in XAML and Tooling for Windows 8.1
What’s new in XAML and Tooling for Windows 8.1What’s new in XAML and Tooling for Windows 8.1
What’s new in XAML and Tooling for Windows 8.1
 

Recently uploaded

chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 

Recently uploaded (20)

chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 

MDC - Material Design Components & Theming

  • 1. Material Design Components Material Theming Subir Chakraborty Harin Trivedi Useful for Android + iOS + Web
  • 3. Components BottomAppBar Bottom NavigationBottomSheet Chips Collapsing Toolbar Floating Action Button Material ButtonMaterial Card Modal Bottom SheetNavigation Views Snackbars Tab layout Text Fields Top App Bars
  • 4.
  • 5. Material Card MaterialCardView is a customizable component based on CardView from the Android Support Library. MaterialCardView provides all of the features of CardView, but adds attributes for customizing the stroke and uses an updated Material style by default. https://material.io/develop/android/compo nents/material-card-view/
  • 6. Material Button Material Button is a customizable button component with updated visual styles. Raised button: A rectangular material button that lifts and displays ink reactions on press Unelevated button: A button made of ink that displays ink reactions on press but does not lift
  • 7. Styles Filled, elevated button (default): The default style represents an elevated button with a colored background. This should be used for important, final actions, like ‘Save’ or ‘Confirm’. style="@style/Widget.MaterialComponents.Button"
  • 8. Styles Filled, unelevated button The UnelevatedButton style represents an unelevated button with a colored background. style="@style/Widget.MaterialComponents.Button. UnelevatedButton"
  • 9. Styles Text button The TextButton style has a transparent background with colored text. Text buttons are used for low-priority actions, especially when presenting multiple options. style="@style/Widget.MaterialComponents.Button. TextButton"
  • 10. Floating Action Buttons A FloatingActionButton displays the primary action in an application. It is a round icon button that’s elevated above other page content. The updated Material FloatingAction Button style consists of updated elevation, ripple, and motion changes. https://material.io/develop/android/comp onents/floating-action-button/
  • 11. Visibility Use the show and hide methods to animate the visibility of a FloatingActionButton. The show animation grows the widget and fades it in, while the hide animation shrinks the widget and fades it out.
  • 12. Bottom App Barss BottomAppBar puts more focus on features, increases engagement, and visually anchors the UI. https://material.io/develop/andr oid/components/bottom-app- bar/
  • 13. BottomAppBar Attributes The placement of the FAB can be controlled by: fabAlignmentMode fabAttached fabCradleMargin fabCradleRoundedCornerRadius fabCradleVerticalOffset.
  • 14. Handling Menu Option 2 ways to handle menu options: 1.setOnMenuItemClickListener (OnMenuItemClickListener) 2. setSupportActionBar() on the BottomAppBar. Handle navigation item click by checking if menu item id is android.R.id.home.
  • 15. Text Fields s TextInputLayout provides an implementation for Material text fields. Used in conjunction with a TextInputEditText, TextInputLayout makes it easy to include Material text fields in your layouts. https://material.io/develop/android/components/text-input- layout/
  • 16. Material Styles Filled Box (Default) Filled text fields have a solid background color and draw more attention. Apply the following style to your TextInputLayout style="@style/Widget.Material Components.TextInputLayout. FilledBox"
  • 17. Material Styles Outline Box Outline text fields have a stroked border. Apply the following style to your TextInputLayout style="@style/Widget.MaterialCo mponents.TextInputLayout. OutlineBox"
  • 18. Style Variations 1.Standard 2.Dense In order to reduce the height of a text box, you can use a dense style, which will reduce the vertical padding within the text box. style="@style/Widget.MaterialComponents.TextInputLayout. FilledBox.Dense" style="@style/Widget.MaterialComponents.TextInputLayout. OutlineBox.Dense"
  • 19. Snackbars The Snackbar disappear automatically, either after a timeout or after a user interaction elsewhere on the screen, and can also be swiped off the screen. Snackbars can also offer the ability to perform an action, such as undoing an action that was just taken, or retrying an action that had failed. https://material.io/develop/android /components/snackbar/
  • 20. Usage Snackbars work best if they are displayed inside of a CoordinatorLayout. CoordinatorLayout allows the snackbar to enable behavior like swipe-to-dismiss, as well as automatically moving widgets like FloatingActionButton.
  • 21. Chips A Chip represents a complex entity in a small block, such as a contact. It is a rounded button that consists of a label, an optional chip icon, and an optional close icon. A chip can either be clicked or toggled if it is checkable. https://material.io/develop/android/components/chip/
  • 22. Entry Chips Filter Chips Action ChipsChoice Chips
  • 25. What & Why? Material Theming is the ability to systematically customize Material Design to better reflect your product’s brand Material Theming consists of three main actions: customizing your theme, applying it across your design mocks, and using it in code
  • 26. UI - Color - Typography
  • 27. Color Theming All Material Design components use a Widget.MaterialComponents style, and these styles reference color attributes from the Material Design theme (Theme.MaterialComponents).
  • 28.
  • 29. Vision In a future update, our themes and components will be updated to reference a new set of color theming attributes. Then, all you need to do is update the color values for these attributes and you can: ➔ Adjust your component colors ➔ Switch between dark and light themes ➔ Ensure accessible color combinations across your app
  • 30. Typography TextAppearance Styles includes: ● Font face name and weight ● Font size ● Letter spacing ● Text transformation
  • 31.
  • 32. Shape Theming The shape library provides a MaterialShapeDrawable class that can draw custom shapes, draws itself using a path generator to easily building new shapes: ❏ CutCornerTreatment ❏ RoundedCornerTreatment ❏ TriangleEdgeTreatment
  • 33.
  • 34. How to Integrate? Android: compileSdkVersion 'android-P' or 28 (Legacy) implementation 'com.android.support:design:28.0.0-alpha3' (AndroidX) implementation 'com.google.android.material:material:1.0.0-alpha1' iOS: pod 'MaterialComponents’ (All-in-one) pod 'MaterialComponents/Buttons' or pod 'MaterialComponents/TextFields'
  • 35. References: 1. https://material.io/design/material- theming/overview.html#material-theming 2. https://material.io/collections/developer-tutorials/ (Includes codelabs for Android & iOS) 3. https://material.io/develop/android/ 4. https://material.io/develop/ios/ 5. https://github.com/material-components

Editor's Notes

  1. Video link : https://material.io/design/assets/1s1rlU7DFBy4VtW3hWuIRWULBY2yrPUX_/casestudy-loop.mp4