From 81d1b772b97ee8df94efbb2dfda8d9cd8fe49f29 Mon Sep 17 00:00:00 2001 From: pubiqq Date: Thu, 2 Nov 2023 17:28:37 +0000 Subject: [PATCH] [Theme] Add NoActionBar dynamic color themes Resolves https://github.com/material-components/material-components-android/pull/3636 GIT_ORIGIN_REV_ID=ab4463028a14e4d4fbd3a613c4c402b8de39f552 PiperOrigin-RevId: 578900644 --- docs/getting-started.md | 26 ++++++++++++------- .../theme/res-public/values/public.xml | 3 +++ .../res/values-night/themes_daynight.xml | 1 + .../material/theme/res/values/themes.xml | 10 +++++++ .../theme/res/values/themes_daynight.xml | 1 + 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 0d5c63ded..5b0472239 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -137,16 +137,22 @@ Here are the `Material3` themes you can use to get the latest component styles and theme-level attributes, as well as their `MaterialComponents` equivalents when applicable. -`Material3` | `MaterialComponents` --------------------------------------- | -------------------- -`Theme.Material3.Light` | `Theme.MaterialComponents.Light` -`Theme.Material3.Light.NoActionBar` | `Theme.MaterialComponents.Light.NoActionBar` -`Theme.Material3.Dark` | `Theme.MaterialComponents` -`Theme.Material3.Dark.NoActionBar` | `Theme.MaterialComponents.NoActionBar` -`Theme.Material3.DayNight` | `Theme.MaterialComponents.DayNight` -`Theme.Material3.DayNight.NoActionBar` | `Theme.MaterialComponents.DayNight.NoActionBar` -N/A | `Theme.MaterialComponents.Light.DarkActionBar` -N/A | `Theme.MaterialComponents.DayNight.DarkActionBar` +| `Material3` | `MaterialComponents` | +|------------------------------------------------------|---------------------------------------------------| +| `Theme.Material3.Light` | `Theme.MaterialComponents.Light` | +| `Theme.Material3.Light.NoActionBar` | `Theme.MaterialComponents.Light.NoActionBar` | +| `Theme.Material3.Dark` | `Theme.MaterialComponents` | +| `Theme.Material3.Dark.NoActionBar` | `Theme.MaterialComponents.NoActionBar` | +| `Theme.Material3.DayNight` | `Theme.MaterialComponents.DayNight` | +| `Theme.Material3.DayNight.NoActionBar` | `Theme.MaterialComponents.DayNight.NoActionBar` | +| `Theme.Material3.DynamicColors.Light` | N/A | +| `Theme.Material3.DynamicColors.Light.NoActionBar` | N/A | +| `Theme.Material3.DynamicColors.Dark` | N/A | +| `Theme.Material3.DynamicColors.Dark.NoActionBar` | N/A | +| `Theme.Material3.DynamicColors.DayNight` | N/A | +| `Theme.Material3.DynamicColors.DayNight.NoActionBar` | N/A | +| N/A | `Theme.MaterialComponents.Light.DarkActionBar` | +| N/A | `Theme.MaterialComponents.DayNight.DarkActionBar` | Update your app theme to inherit from one of these themes: diff --git a/lib/java/com/google/android/material/theme/res-public/values/public.xml b/lib/java/com/google/android/material/theme/res-public/values/public.xml index 931215060..2f233185d 100644 --- a/lib/java/com/google/android/material/theme/res-public/values/public.xml +++ b/lib/java/com/google/android/material/theme/res-public/values/public.xml @@ -22,8 +22,11 @@ + + + diff --git a/lib/java/com/google/android/material/theme/res/values-night/themes_daynight.xml b/lib/java/com/google/android/material/theme/res/values-night/themes_daynight.xml index dd4307c45..ba3ee2f20 100644 --- a/lib/java/com/google/android/material/theme/res/values-night/themes_daynight.xml +++ b/lib/java/com/google/android/material/theme/res/values-night/themes_daynight.xml @@ -19,6 +19,7 @@ + + +