Skip to content

Commit

Permalink
[Docs] Fix misspelling in Color doc.
Browse files Browse the repository at this point in the history
Resolves #4012
Resolves #4011

GIT_ORIGIN_REV_ID=76aff477a4365c2a048790f33c72dcaa661d901b
PiperOrigin-RevId: 600461138

(cherry picked from commit 6cb921b)
  • Loading branch information
manabu-nakamura authored and hunterstich committed Mar 21, 2024
1 parent cc5e890 commit 2a12851
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/theming/Color.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,13 @@ optionally specify an `OnAppliedCallback` function, which will be called after
dynamic colors have been applied:

```java
DynamicColorsOptions dynamicColorOptions =
DynamicColorsOptions dynamicColorsOptions =
new DynamicColorsOptions.Builder()
.setThemeOverlay(themeOverlay)
.setPrecondition(precondition)
.setOnAppliedCallback(onAppliedCallback)
.build()
DynamicColors.applyToActivitiesIfAvailable(application, dynamicColorOptions);
DynamicColors.applyToActivitiesIfAvailable(application, dynamicColorsOptions);
```

##### Apply dynamic colors to a specific activity using `DynamicColorsOptions`
Expand All @@ -321,13 +321,13 @@ You can also apply dynamic colors to a specific activity in the app by passing
in the specific activity and a `DynamicColorsOptions` object:

```java
DynamicColorsOptions dynamicColorOptions =
DynamicColorsOptions dynamicColorsOptions =
new DynamicColorsOptions.Builder()
.setThemeOverlay(themeOverlay)
.setPrecondition(precondition)
.setOnAppliedCallback(onAppliedCallback)
.build()
DynamicColors.applyToActivityIfAvailable(activity, dynamicColorOptions);
DynamicColors.applyToActivityIfAvailable(activity, dynamicColorsOptions);
```

##### Apply dynamic colors to a specific fragment/view
Expand Down Expand Up @@ -599,7 +599,7 @@ suggested default when applying dynamic colors, is to harmonize M3 Error colors
in the callback when constructing `DynamicColorsOptions`:

```java
DynamicColorsOptions dynamicColorOptions =
DynamicColorsOptions dynamicColorsOptions =
new DynamicColorsOptions.Builder(activity)
...
.setOnAppliedCallback(
Expand All @@ -608,7 +608,7 @@ DynamicColorsOptions dynamicColorOptions =
activity,
HarmonizedColorsOptions.createMaterialDefaults()))
.build()
DynamicColors.applyToActivityIfAvailable(activity, dynamicColorOptions);
DynamicColors.applyToActivityIfAvailable(activity, dynamicColorsOptions);
```

For color ressources harmonization in a fragment/view, you would use the context
Expand Down

0 comments on commit 2a12851

Please sign in to comment.