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
Nairobi IO Extended Dark Theme
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
David Odari
June 15, 2019
Programming
90
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Nairobi IO Extended Dark Theme
A brief overview of Androids Dark theme from Google IO 2019.
David Odari
June 15, 2019
More Decks by David Odari
See All by David Odari
Ship Faster With Feature Flags
davidodari
0
320
Getting Started with Jetpack Compose
davidodari
0
160
Persistence
davidodari
0
81
Building Trust in a Multicultural Team
davidodari
1
38
Room ORM | Workshop 2 | GADS 2020
davidodari
0
170
Android 11 Meetups: Whats New In Android
davidodari
0
440
Journey as an Android Developer
davidodari
1
170
Improve Quality of Android Apps with BDD
davidodari
0
190
Quick Intro To Kotlin Generics
davidodari
0
220
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
630
What's New in Android 2026
veronikapj
0
260
VibeCodingからAgenticWorkflowへ
starfish719
0
620
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
190
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.8k
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
500
メールのエイリアス機能を履き違えない
isshinfunada
0
240
仕様駆動開発の消費期限
watany
20
8.6k
5分で問診!Composer セキュリティ健康診断
codmoninc
0
1k
数百円から始めるRuby電子工作
tarosay
0
160
Foundation Models frameworkで画像分析
ryodeveloper
1
620
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
240
Featured
See All Featured
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
[SF Ruby Conf 2025] Rails X
palkan
2
1.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
470
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
470
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Transcript
| Dark Theme
David Odari IT Student at Jkuat, Android Developer
| Dark Theme
A contrast of material theme with dark background colors and
light foreground colors.
System wide dark mode. Android Q
• Save On Battery • Accessibility • Low Light Environment
Why DarkTheme ?
Force Dark Rapid Adoption Of Dark Theme on API 29+,
Q. NEW IN Q
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="android:forceDarkAllowed">true</item> </style> <ImageView …. android:forceDarkAllowed =
“false” />
None
Custom Dark Theme
DayNight AppCompat and MDC
<style name="AppTheme" parent="Theme.AppCompat.DayNight"> Or <style name="AppTheme" parent="Theme.MaterialComponents.DayNight">
AppCompat Material Components
Theme Attributes Avoid Hard Coding Values
values/themes.xml <style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar"> values-night/themes.xml <style name="AppTheme" parent="Theme.MaterialComponents.DarkActionBar">
Modes
Tell Appcompat what mode to use with; AppCompatDelegate.setDefaultNightMode() getDelegate().setLocalNightMode()
Available Modes //Always Dark Themed MODE_NIGHT_YES //Always Light Themed MODE_NIGHT_NO
//Uses Current System Setting ( For Q and Above) MODE_NIGHT_FOLLOW_SYSTEM //Switches to dark theme when battery saver is activated MODE_NIGHT_AUTO_BATTERY
//Changes between day/night based on the time of day. MODE_NIGHT_AUTO_TIME
DEPRECATED
Theme Settings
Android P and Below Light Dark Set By Battery Saver
Android Q and Above Light Dark System Default
Elevation
Elevation will not work on Dark Theme. Elevation overlays solve
this by applying the concept of surfaces becoming lighter with higher elevation. Overlays surface of components with colorSurface attribute.
• Material Shape Drawable • ElevationOverlayProvider Custom Views
Configuration
Triggers the uiMode configuration change Activity declares it can handle
<activity ... android:configChanges="uiMode" /> onConfigurationChanged() method will be called
fun checkDarkThemeMode(context: Context) : String { val mode = context.resources.configuration.uiMode.and(
Configuration.UI_MODE_NIGHT_MASK) return when(mode){ Configuration.UI_MODE_NIGHT_NO -> “Light Theme” Configuration.UI_MODE_NIGHT_YES -> “Dark Theme” Configuration.UI_MODE_NIGHT_UNDEFINED -> “Unknown Mode” } }
Illustrations Use theme attributes or provide a variant for each
theme for vector assets.
Notifications Work Out the Box with system provided templates
Demo /Davidodari/NightKing @_davidodari