Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 34

Android Developer Fundamentals V2

Delightful User
Experience
Lesson 5

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 1
national License
5.2 Material Design

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 2
national License
Contents

● The Material Metaphor ● Motion


● Imagery ● Layout
● Typography ● Components
● Color

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 3
national License
The Material
Metaphor

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 4
national License
What is Material Design?

● Design guidelines
● Visual language
● Combine classic principles of good design with innovation
and possibilities of technology and science
● Material Design Spec

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 5
national License
Material metaphor
● Three-dimensional environment containing
light, material, and shadows
● Surfaces and edges provide visual cues grounded in
reality
● Fundamentals of light, surface, and movement convey
how objects move, interact, and exist in space and in
relation to each other
Material This work is licensed under a
Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 6
national License
Material design in your app
Elements in your Android app should behave similarly to real
world materials
● Cast shadows
● Occupy space
● Interact with each other

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 7
national License
Bold, graphic, intentional
● Choose colors deliberately
● Fill screen edge to edge
● Use large-scale typography
● Use white space intentionally
● Emphasize user action
● Make functionality obvious

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 8
national License
Imagery

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 9
national License
Imagery

Images help you communicate and differentiate your app

Should be Best practices


● Relevant ● Use together with text
● Informative ● Original images
● Delightful ● Provide point of focus
● Build a narrative
Material This work is licensed under a
Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 10
national License
Typography

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 11
national License
Roboto typeface
Roboto is the standard typeface on Android
Roboto has 6 weights
● Thin
● Light
● Regular
● Medium
● Bold
● Black
Material This work is licensed under a
Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 12
national License
Font styles and scale
● Too many sizes is confusing Display 4

and looks bad Display 3

● Limited set of sizes that Display 2


Display 1
work well together Headline
Title
Subheading
Body 2
Body 1
Caption
Button

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 13
national License
Setting text appearance

android:textAppearance=
"@style/TextAppearance.AppCompat.Display3"

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 14
national License
Fonts as resources

● Bundle fonts as resources in app package (APK)


● Create font folder within res, add font XML file to font
● To access font resource:
○ @font/myfont
○ R.font.myfont
● Android 8.0 (API level 26) — Android 4.1 (API level 16) and
higher, use the Support Library 26
● See Fonts in XML
Material This work is licensed under a
Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 15
national License
Downloadable fonts

● Download fonts from provider app


○ Reduces APK size
○ Increases the app installation success rate
○ Improves the overall system health, saves cellular data, phone
memory, and disk space
● Android 8.0 (API level 26) — API level 14 and higher, use
Support Library 26
● See Downloadable Fonts
Material This work is licensed under a
Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 16
national License
Color

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 17
national License
Color

● Bold hues
● Muted environments
● Deep shadows
● Bright highlights

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 18
national License
Color palette
Material Design recommends using
● a primary color
● along with some shades
● and an accent color
Create a bold user experience for your app
● Material Design Color Palette

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 19
national License
Color palette for your project

● Android Studio creates a color palette for you


● AppTheme definition in styles.xml
○ colorPrimary—AppBar, branding
○ colorPrimaryDark—status bar, contrast
○ colorAccent—draw user attention, switches, FAB

● Colors defined in colors.xml


● Color selection tool
Material This work is licensed under a
Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 20
national License
Text color and contrast
Good choice
● Contrast for visual separation
Good choice
● Contrast for readability
Bad choice
● Contrast for accessibility
● Not all people see colors the same Bad choice

● Theme handles text by default Bad choice

○ Theme.AppCompat.Light—text will be near black Good choice

○ Theme.AppCompat.Light.DarkActionBar—text near white


Material This work is licensed under a
Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 21
national License
Motion

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 22
national License
Motion
Motion in Material Design Motion is
describes ● Responsive
● Spatial relationships ● Natural
● Functionality ● Aware
● Intention ● Intentional

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 23
national License
Motion in your app
● Maintain continuity
● Highlight elements or actions
Touch feedback
● Transition naturally between actions Responsive interaction
or states
● Draw focus
● Organize transitions
● Responsive feedback
Material This work is licensed under a
Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 24
national License
Layout

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 25
national License
Layout for Material Design
● Density independent pixels for views—dp
● Scalable pixels for text—sp
● Elements align to a grid with consistent spacing
● Plan your layout
● Use templates for common layout patterns

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 26
national License
Layout planning

Spacing Grid alignment Sizing


Material This work is licensed under a
Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 27
national License
Components

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 28
national License
Components
Material Design has guidelines on the use and implementation
of Android components
● Bottom Navigation ● Sliders
● Buttons ● Snackbar
● Cards ● Toasts
● Chips ● Steppers
● Data Tables ● Subheaders
● Dialogs ● Text Fields
● Dividers ● Toolbars

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 29
national License
More components

● Expansion Panels
● Grid Lists
● Lists
● Menus
● Pickers
● Progress Bars
● Selection Controls

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 30
national License
Consistency helps user intuition
FAB

Tabs

Snackbar Navigation Drawer


Material This work is licensed under a
Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 31
national License
Learn more

● Material Design Guidelines ● Cards and Lists Guide


● Floating Action Button
● Material Design Guide Reference
● Material Design for Android ● Defining Custom Anim
ations
● Material Design for Developers
● View Animation
● Material Palette Generator
Material This work is licensed under a
Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 32
national License
What's Next?

● Concept Chapter: 5.2 Material Design


● Practical: 5.2 Cards, and colors

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 33
national License
END

Material This work is licensed under a


Android Developer Fundamentals V2 Design
Creative Commons Attribution 4.0 Inter 34
national License

You might also like