# ResourcesCompat.ThemeCompat

# ResourcesCompat.ThemeCompat

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/content/res/ResourcesCompat.java+class:androidx.core.content.res.ResourcesCompat.ThemeCompat)  
Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/content/res/ResourcesCompat.ThemeCompat "View this page in Java")

<br />

```
class ResourcesCompat.ThemeCompat
```

<br />

*** ** * ** ***

Provides backward-compatible implementations for new[Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)APIs.

## Summary

|                                    ### Public functions                                     |
|---------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [rebase](https://developer.android.com/reference/kotlin/androidx/core/content/res/ResourcesCompat.ThemeCompat#rebase(android.content.res.Resources.Theme))`(theme: `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)`)` Rebases the theme against the parent Resource object's current configuration by re-applying the styles passed to[applyStyle](https://developer.android.com/reference/android/content/res/Resources.Theme.html#applyStyle(int, boolean)). |

## Public functions

### rebase

Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)  

```
java-static fun rebase(theme: Resources.Theme): Unit
```

Rebases the theme against the parent Resource object's current configuration by re-applying the styles passed to[applyStyle](https://developer.android.com/reference/android/content/res/Resources.Theme.html#applyStyle(int, boolean)).

Compatibility behavior:

- API 29 and above, this method matches platform behavior.
- API 23 through 28, this method attempts to match platform behavior by calling into hidden platform APIs, but is not guaranteed to succeed.
- API 22 and earlier, this method does nothing.

|                                                  Parameters                                                  |
|--------------------------------------------------------------------------------------------------------------|---------------------|
| `theme: `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html) | the theme to rebase |