# DynamicColors.Precondition

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/color/DynamicColors.java)

*** ** * ** ***


```
public interface DynamicColors.Precondition
```

<br />

*** ** * ** ***

The interface that provides a precondition to decide if dynamic colors should be applied.

## Summary

| ### Public methods |
|---|---|
| `abstract boolean` | `https://developer.android.com/reference/com/google/android/material/color/DynamicColors.Precondition#shouldApplyDynamicColors(Activity,int)(Activity activity, int theme)` Return `true` if dynamic colors should be applied on the given activity with the given theme overlay. |

## Public methods

### shouldApplyDynamicColors

```
abstract boolean shouldApplyDynamicColors(Activity activity, int theme)
```

Return `true` if dynamic colors should be applied on the given activity with the given theme overlay.