ResourcesCompat.ThemeCompat

public final class ResourcesCompat.ThemeCompat


Provides backward-compatible implementations for new Theme APIs.

Summary

Public constructors

Public methods

static void

Rebases the theme against the parent Resource object's current configuration by re-applying the styles passed to applyStyle.

Public constructors

ThemeCompat

public final ThemeCompat()

Public methods

rebase

public static void rebase(@NonNull Resources.Theme theme)

Rebases the theme against the parent Resource object's current configuration by re-applying the styles passed to applyStyle.

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
@NonNull Resources.Theme theme

the theme to rebase