Skip to content

Commit b49284e

Browse files
dsn5ftraajkumars
authored andcommitted
[M3][Toolbar] Hide shadows on all M3 Toolbar styles, not just Surface style
Resolves #2552 PiperOrigin-RevId: 429059800
1 parent 18554d9 commit b49284e

File tree

1 file changed

+4
-4
lines changed
  • lib/java/com/google/android/material/appbar/res/values

1 file changed

+4
-4
lines changed

lib/java/com/google/android/material/appbar/res/values/styles.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@
194194
<item name="titleTextAppearance">?attr/textAppearanceTitleLarge</item>
195195
<item name="subtitleTextAppearance">?attr/textAppearanceTitleMedium</item>
196196
<item name="contentInsetStartWithNavigation">0dp</item>
197+
198+
<!-- On newer API levels, hide shadows while keeping elevation. -->
199+
<item name="android:outlineAmbientShadowColor" tools:ignore="NewApi">@android:color/transparent</item>
200+
<item name="android:outlineSpotShadowColor" tools:ignore="NewApi">@android:color/transparent</item>
197201
</style>
198202

199203
<!-- Style for a M3 On Surface Toolbar (transparent background and on-surface
@@ -211,10 +215,6 @@
211215
navigation icon and menu icon coloring. -->
212216
<style name="Widget.Material3.Toolbar.Surface" parent="Widget.Material3.Toolbar.OnSurface">
213217
<item name="android:background">?attr/colorSurface</item>
214-
215-
<!-- On newer API levels, hide shadows while keeping elevation. -->
216-
<item name="android:outlineAmbientShadowColor" tools:ignore="NewApi">@android:color/transparent</item>
217-
<item name="android:outlineSpotShadowColor" tools:ignore="NewApi">@android:color/transparent</item>
218218
</style>
219219

220220
<style name="ThemeOverlay.Material3.Toolbar.Surface" parent="">

0 commit comments

Comments
 (0)