ContextThemeWrapper


class ContextThemeWrapper : ContextWrapper


A context wrapper that allows you to modify or replace the theme of the wrapped context.

Summary

Public constructors

Creates a new context wrapper with no theme and no base context.

ContextThemeWrapper(base: Context!, themeResId: @StyleRes Int)

Creates a new context wrapper with the specified theme.

Creates a new context wrapper with the specified theme.

Public functions

Unit
applyOverrideConfiguration(overrideConfiguration: Configuration!)

Call to set an "override configuration" on this context -- this is a configuration that replies one or more values of the standard configuration that is applied to the context.

AssetManager!
Resources!
Any!
Resources.Theme!
Int

Returns the resource ID of the theme that is to be applied on top of the base context's theme.

Unit
setTheme(resid: Int)

Protected functions

Unit
Unit
onApplyThemeResource(theme: Resources.Theme!, resid: Int, first: Boolean)

Called by setTheme and getTheme to apply a theme resource to the current Theme object.

Inherited Constants

From android.content.Context
const String!
ACCESSIBILITY_SERVICE = "accessibility"
const String!
ACCOUNT_SERVICE = "account"
const String!
ACTIVITY_SERVICE = "activity"
const String!
ADVANCED_PROTECTION_SERVICE = "advanced_protection"
const String!
ALARM_SERVICE = "alarm"
const String!
APPWIDGET_SERVICE = "appwidget"
const String!
APP_FUNCTION_SERVICE = "app_function"
const String!
APP_OPS_SERVICE = "appops"
const String!
APP_SEARCH_SERVICE = "app_search"
const String!
AUDIO_SERVICE = "audio"
const String!
AUTOFILL_SERVICE = "autofill"
const String!
BATTERY_SERVICE = "batterymanager"
const Int
const Int
const Int
const Int
const Int
const Int
const Int
BIND_EXTERNAL_SERVICE = -2147483648
const Long
BIND_EXTERNAL_SERVICE_LONG = 4611686018427387904
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const String!
BIOMETRIC_SERVICE = "biometric"
const String!
BLOB_STORE_SERVICE = "blob_store"
const String!
BLUETOOTH_SERVICE = "bluetooth"
const String!
BUGREPORT_SERVICE = "bugreport"
const String!
CAMERA_SERVICE = "camera"
const String!
CAPTIONING_SERVICE = "captioning"
const String!
CARRIER_CONFIG_SERVICE = "carrier_config"
const String!
CHOOSER_SERVICE = "chooser"
const String!
CLIPBOARD_SERVICE = "clipboard"
const String!
COMPANION_DEVICE_SERVICE = "companiondevice"
const String!
CONNECTIVITY_DIAGNOSTICS_SERVICE = "connectivity_diagnostics"
const String!
CONNECTIVITY_SERVICE = "connectivity"
const String!
CONSUMER_IR_SERVICE = "consumer_ir"
const String!
CONTACT_KEYS_SERVICE = "contact_keys"
const Int
const Int
const Int
const String!
CREDENTIAL_SERVICE = "credential"
const String!
CROSS_PROFILE_APPS_SERVICE = "crossprofileapps"
const Int
const Int
const String!
DEVICE_LOCK_SERVICE = "device_lock"
const String!
DEVICE_POLICY_SERVICE = "device_policy"
const String!
DISPLAY_HASH_SERVICE = "display_hash"
const String!
DISPLAY_SERVICE = "display"
const String!
DOMAIN_VERIFICATION_SERVICE = "domain_verification"
const String!
DOWNLOAD_SERVICE = "download"
const String!
DROPBOX_SERVICE = "dropbox"
const String!
EUICC_SERVICE = "euicc"
const String!
FILE_INTEGRITY_SERVICE = "file_integrity"
const String!
FILE_SERVICE = "file"
const String!
GAME_SERVICE = "game"
const String!
GRAMMATICAL_INFLECTION_SERVICE = "grammatical_inflection"
const String!
HARDWARE_PROPERTIES_SERVICE = "hardware_properties"
const String!
HEALTHCONNECT_SERVICE = "healthconnect"
const String!
INPUT_METHOD_SERVICE = "input_method"
const String!
INPUT_SERVICE = "input"
const String!
IPSEC_SERVICE = "ipsec"
const String!
JOB_SCHEDULER_SERVICE = "jobscheduler"
const String!
KEYGUARD_SERVICE = "keyguard"
const String!
KEYSTORE_SERVICE = "keystore"
const String!
LAUNCHER_APPS_SERVICE = "launcherapps"
const String!
LAYOUT_INFLATER_SERVICE = "layout_inflater"
const String!
LOCALE_SERVICE = "locale"
const String!
LOCATION_SERVICE = "location"
const String!
MEDIA_COMMUNICATION_SERVICE = "media_communication"
const String!
MEDIA_METRICS_SERVICE = "media_metrics"
const String!
MEDIA_PROJECTION_SERVICE = "media_projection"
const String!
MEDIA_QUALITY_SERVICE = "media_quality"
const String!
MEDIA_ROUTER_SERVICE = "media_router"
const String!
MEDIA_SESSION_SERVICE = "media_session"
const String!
MIDI_SERVICE = "midi"
const Int
MODE_APPEND = 32768
const Int
const Int

This property is deprecated.

const Int
const Int
const Int

This property is deprecated.

const Int

This property is deprecated.

const String!
const String!
NFC_SERVICE = "nfc"
const String!
NOTIFICATION_SERVICE = "notification"
const String!
NPU_SERVICE = "npu"
const String!
NSD_SERVICE = "servicediscovery"
const String!
OVERLAY_SERVICE = "overlay"
const String!
PCC_SANDBOX_SERVICE = "pcc_sandbox"
const String!
PEOPLE_SERVICE = "people"
const String!
PERFORMANCE_HINT_SERVICE = "performance_hint"
const String!
PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block"
const String!
POWER_SERVICE = "power"
const String!
PRINT_SERVICE = "print"
const String!
PROFILING_SERVICE = "profiling"
const Int
const Int
const Int
const String!
RESTRICTIONS_SERVICE = "restrictions"
const String!
ROLE_SERVICE = "role"
const String!
SATELLITE_SERVICE = "satellite"
const String!
SEARCH_SERVICE = "search"
const String!
SECURITY_STATE_SERVICE = "security_stat