Recap
● Typography is not just about choosing a typeface
● Material Design type scale has a range of styles for you
to use
● Google Fonts is an awesome place to find open source
fonts
Slide 52
Slide 52 text
Theming
In
Android
Color
Typography
Style
Theme
Slide 53
Slide 53 text
No content
Slide 54
Slide 54 text
Font Color
Font Size
Background Colour
Padding
MinHeight
MinWidth
...
Recap
● To customize a look of a view, create a style, and apply
that style to it
● Refer to documentation to see what attributes are
available to style a particular view
Slide 67
Slide 67 text
Theming
In
Android
Color
Typography
Style
Theme
Slide 68
Slide 68 text
...is a type of style that is applied to:
● The entire application
● Activity
● View Hierarchy
Recap
● Avoid hardcoding values
● Create a theme for styles that are consistent throughout the app
Slide 72
Slide 72 text
Dark Theme
Slide 73
Slide 73 text
● Uses dark grey as the primary surface color
for components
○ Helps in reducing eye strain
● Elevated surfaces are illuminated
○ The higher the elevation, the lighter the
surface
● “On” colours on a dark theme are white and
black
Slide 74
Slide 74 text
Dark Theme Benefits
● Power usage reduction
● Makes it easier to use your device in a
low light environment
● Improves visibility for users with low
vision
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
AppCompatDelegate.setDefaultNightMode(
AppCompatDelegate.MODE_NIGHT_YES)
setContentView(R.layout.activity_home)
}
Slide 82
Slide 82 text
Recap
● DayNight can be applied to both AppCompat and MaterialComponents
● Do not hardcode values
● Dark theme uses grey instead of black
● Keep accessibility in mind
Slide 83
Slide 83 text
What to keep at the back of your
mind:
Android’s Style Hierarchy
Slide 84
Slide 84 text
Android’s Style Hierarchy
1. Applying character- or paragraph-level styling
via text spans to textview-derived classes
2. Applying attributes programmatically
3. Applying individual attributes directly to a View
4. Applying a style to a View
Slide 85
Slide 85 text
Android’s Style Hierarchy
5. Default styling
6. Applying a theme to a collection of Views, an activity,
or your entire app
7. Applying certain View-specific styling, such as setting
a textappearance on a textview
Slide 86
Slide 86 text
Thank You!
Slide 87
Slide 87 text
Resources
● Material Design
○ https://material.io/
● Android Developer Guide User Interface
○ https://developer.android.com/guide/topics/ui
● Smashing Magazine
○ https://www.smashingmagazine.com/2018/02/comprehensive-guide-to-mobile
-app-design/